fixed bug where Tiles would be replaced with Fields on PlayerBase.destroy()

This commit is contained in:
Kjistóf 2016-05-14 16:16:59 +02:00
parent 55cae38f5f
commit 23271cc086
3 changed files with 26 additions and 14 deletions

View File

@ -22,6 +22,7 @@ public class Game {
private Game() {}
public void playerBaseDestroyed(PlayerBase caller) {
if (caller.getCurrentTile().isGap()) {
Field field = new Field();
Tile callertile = caller.getCurrentTile();
@ -44,6 +45,7 @@ public class Game {
Game.instance.updateDisplay();
}
}
public void playerDestroyed(Player caller) {
dungeon.setZPMsToWin(dungeon.getZPMsToWin() - caller.getZPMCount());

View File

@ -11,6 +11,12 @@ public class Gap extends cicaprojekt.Tile {
return true;
}
@Override
public boolean isGap()
{
return true;
}
@Override
public void onEntry(PlayerBase playerBase) {
super.onEntry(playerBase);

View File

@ -65,6 +65,10 @@ public abstract class Tile {
return zpm;
}
public boolean isGap() {
return false;
}
public void putABox(Box box) {
if (box == null)
return;