From b37606b86f5e135df6e47716f580cc4d1f48c93f Mon Sep 17 00:00:00 2001 From: ericnerdo Date: Tue, 26 Apr 2016 00:44:47 +0200 Subject: [PATCH] attribute boolean destroyed and its getter added to PlayerBase --- cicaprojekt/PlayerBase.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cicaprojekt/PlayerBase.java b/cicaprojekt/PlayerBase.java index d58d94b..7e25fc6 100644 --- a/cicaprojekt/PlayerBase.java +++ b/cicaprojekt/PlayerBase.java @@ -5,11 +5,13 @@ public class PlayerBase implements Destroyable { protected Tile currentTile; protected Direction facingDirection; protected String name; + protected boolean destroyed; public PlayerBase(String name, Tile startTile, Direction startDirection) { this.name = name; currentTile = startTile; facingDirection = startDirection; + destroyed = false; } @Override @@ -18,6 +20,7 @@ public class PlayerBase implements Destroyable { } public void destroy() { + destroyed = true; } public Tile getCurrentTile() { @@ -78,4 +81,8 @@ public class PlayerBase implements Destroyable { public void setFacingDirection(Direction direction) { facingDirection = direction; } + + public boolean isDestroyed(){ + return destroyed; + } }