diff options
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r-- | core/src/ch/asynk/tankontank/engine/Move.java | 5 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/engine/PossiblePaths.java | 7 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Map.java | 5 |
3 files changed, 8 insertions, 9 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Move.java b/core/src/ch/asynk/tankontank/engine/Move.java index 0eb3c86..16a0860 100644 --- a/core/src/ch/asynk/tankontank/engine/Move.java +++ b/core/src/ch/asynk/tankontank/engine/Move.java @@ -102,11 +102,6 @@ public class Move extends Path implements Iterable<Vector3> return (type != MoveType.ENTER); } - public void setExit() - { - type = MoveType.EXIT; - } - public int steps() { int steps = 0; diff --git a/core/src/ch/asynk/tankontank/engine/PossiblePaths.java b/core/src/ch/asynk/tankontank/engine/PossiblePaths.java index 1dbb12b..f45b3ac 100644 --- a/core/src/ch/asynk/tankontank/engine/PossiblePaths.java +++ b/core/src/ch/asynk/tankontank/engine/PossiblePaths.java @@ -200,6 +200,13 @@ public class PossiblePaths implements Disposable return Move.get(pawn, from, to, orientation, getPath(0)); } + public Move getExitMove() + { + Move move = getMove(); + move.type = Move.MoveType.EXIT; + return move; + } + public Path getPath(int i) { if (ctrlTiles.size() == 0) diff --git a/core/src/ch/asynk/tankontank/game/Map.java b/core/src/ch/asynk/tankontank/game/Map.java index 7a28a70..35a4325 100644 --- a/core/src/ch/asynk/tankontank/game/Map.java +++ b/core/src/ch/asynk/tankontank/game/Map.java @@ -295,10 +295,7 @@ public abstract class Map extends Board // unit.reset(); // } - Move move = possiblePaths.getMove(); - move.setExit(); - - movePawn(unit, move, notifyDoneAnimation(unit), objectives); + movePawn(unit, possiblePaths.getExitMove(), notifyDoneAnimation(unit), objectives); return startMove(unit); } |