summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'core/src')
-rw-r--r--core/src/ch/asynk/tankontank/engine/Pawn.java5
-rw-r--r--core/src/ch/asynk/tankontank/game/Unit.java2
2 files changed, 6 insertions, 1 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Pawn.java b/core/src/ch/asynk/tankontank/engine/Pawn.java
index b81f8c2..c10d3e7 100644
--- a/core/src/ch/asynk/tankontank/engine/Pawn.java
+++ b/core/src/ch/asynk/tankontank/engine/Pawn.java
@@ -84,6 +84,11 @@ public abstract class Pawn implements Moveable, Disposable
entryMove = false;
orientation = Orientation.KEEP;
}
+
+ public boolean isComplete()
+ {
+ return ((from != null) && (to != null));
+ }
}
private static final float MOVE_TIME = 0.4f;
diff --git a/core/src/ch/asynk/tankontank/game/Unit.java b/core/src/ch/asynk/tankontank/game/Unit.java
index 3e5052e..e97ff2f 100644
--- a/core/src/ch/asynk/tankontank/game/Unit.java
+++ b/core/src/ch/asynk/tankontank/game/Unit.java
@@ -205,7 +205,7 @@ public class Unit extends HeadedPawn
TankOnTank.debug(move.toString());
if (move.cost > mpLeft) TankOnTank.debug("ERROR: Movement point exceeded: " + move.cost + "/" + mpLeft + " please report");
- if (!move.entryMove) {
+ if (move.isComplete()) {
hasMoved = true;
}
mpLeft -= move.cost;