From 6c375f94bfcf45163055648612cfb9c7902e15f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kjist=C3=B3f?= Date: Sat, 14 May 2016 10:44:36 +0200 Subject: [PATCH] fixed a bug where a Player would destroy a Gap as PlayerBases do --- cicaprojekt/Gap.java | 1 - cicaprojekt/PlayerBase.java | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/cicaprojekt/Gap.java b/cicaprojekt/Gap.java index 60c6bf7..6646ca1 100644 --- a/cicaprojekt/Gap.java +++ b/cicaprojekt/Gap.java @@ -14,7 +14,6 @@ public class Gap extends cicaprojekt.Tile { public void onEntry(PlayerBase playerBase) { super.onEntry(playerBase); playerBase.destroy(); - Game.instance.playerBaseDestroyed(playerBase); } public void onExit(PlayerBase playerBase) throws IllegalStateException { diff --git a/cicaprojekt/PlayerBase.java b/cicaprojekt/PlayerBase.java index 892a2cf..0d1cd49 100644 --- a/cicaprojekt/PlayerBase.java +++ b/cicaprojekt/PlayerBase.java @@ -20,6 +20,7 @@ public class PlayerBase implements Destroyable { public void destroy() { destroyed = true; + Game.instance.playerBaseDestroyed(this); } public Tile getCurrentTile() {