replicators now make Gaps Fields
This commit is contained in:
@ -21,6 +21,30 @@ public class Game {
|
||||
|
||||
private Game() {}
|
||||
|
||||
public void playerBaseDestroyed(PlayerBase caller) {
|
||||
Field field = new Field();
|
||||
Tile callertile = caller.getCurrentTile();
|
||||
|
||||
field.setAdajacentTile(caller.getCurrentTile().getAdjacentTile(Direction.NORTH), Direction.NORTH);
|
||||
callertile.getAdjacentTile(Direction.NORTH).setAdajacentTile(field, Direction.SOUTH);
|
||||
|
||||
field.setAdajacentTile(caller.getCurrentTile().getAdjacentTile(Direction.SOUTH), Direction.SOUTH);
|
||||
callertile.getAdjacentTile(Direction.SOUTH).setAdajacentTile(field, Direction.NORTH);
|
||||
|
||||
field.setAdajacentTile(caller.getCurrentTile().getAdjacentTile(Direction.WEST), Direction.WEST);
|
||||
callertile.getAdjacentTile(Direction.WEST).setAdajacentTile(field, Direction.EAST);
|
||||
|
||||
field.setAdajacentTile(caller.getCurrentTile().getAdjacentTile(Direction.EAST), Direction.EAST);
|
||||
callertile.getAdjacentTile(Direction.EAST).setAdajacentTile(field, Direction.WEST);
|
||||
|
||||
Game.instance.updateDisplay();
|
||||
}
|
||||
|
||||
public void playerDestroyed(Player caller) {
|
||||
dungeon.setZPMsToWin(dungeon.getZPMsToWin() - caller.getZPMCount());
|
||||
Game.instance.updateDisplay();
|
||||
}
|
||||
|
||||
public void setDungeon(Dungeon dungeon) {
|
||||
this.dungeon = dungeon;
|
||||
}
|
||||
|
Reference in New Issue
Block a user