summaryrefslogtreecommitdiffstats
path: root/core/src/ch
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2015-01-21 23:25:45 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2015-01-21 23:25:45 +0100
commitd89a62531607c05cdb011635710a78b8e59c7a79 (patch)
treed1990e694b8da816292124d6467ff5fbd917bb1c /core/src/ch
parentc4ddea59f65ea632f24d68793837dd712b629e42 (diff)
downloadRustAndDust-d89a62531607c05cdb011635710a78b8e59c7a79.zip
RustAndDust-d89a62531607c05cdb011635710a78b8e59c7a79.tar.gz
StateMove: coding style
Diffstat (limited to 'core/src/ch')
-rw-r--r--core/src/ch/asynk/tankontank/game/Map.java5
-rw-r--r--core/src/ch/asynk/tankontank/game/states/StateMove.java6
2 files changed, 3 insertions, 8 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Map.java b/core/src/ch/asynk/tankontank/game/Map.java
index a756819..390b517 100644
--- a/core/src/ch/asynk/tankontank/game/Map.java
+++ b/core/src/ch/asynk/tankontank/game/Map.java
@@ -370,11 +370,6 @@ public abstract class Map extends Board implements MoveToAnimationCb, ObjectiveS
public int exitBoard(Unit unit)
{
- // if (unit.justEntered()) {
- // objectives.revert();
- // unit.reset();
- // }
-
return process(unit, pathBuilder.getExitMove());
}
diff --git a/core/src/ch/asynk/tankontank/game/states/StateMove.java b/core/src/ch/asynk/tankontank/game/states/StateMove.java
index f81035d..cce19a6 100644
--- a/core/src/ch/asynk/tankontank/game/states/StateMove.java
+++ b/core/src/ch/asynk/tankontank/game/states/StateMove.java
@@ -101,7 +101,7 @@ public class StateMove extends StateCommon
public void touchUp()
{
if (upHex == activeUnit.getHex()) {
- if (to !=null)
+ if (to != null)
map.hidePath(to);
to = null;
map.pathBuilder.clear();
@@ -123,7 +123,7 @@ public class StateMove extends StateCommon
}
if (s == 1) {
- if (!checkExit(activeUnit, to))
+ if (!checkExit(activeUnit, upHex))
ctrl.setState(StateType.ROTATE);
}
}
@@ -149,8 +149,8 @@ public class StateMove extends StateCommon
map.showPossibleMoves();
map.selectHex(hex);
activeUnit.enableOverlay(Unit.MOVE, false);
- checkExit(activeUnit, hex);
ctrl.hud.notify(activeUnit.toString());
+ checkExit(activeUnit, hex);
}
private int collectPaths(Hex hex)