summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-10-07 23:35:08 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2014-10-07 23:35:08 +0200
commitb4c304514291ecabb75821163d46b370a1c2290c (patch)
tree22ccb4ec915d2011f555ca40f6dab93fb6b1ea78 /core/src/ch/asynk/tankontank
parent8cf208a92b7d95fcee239413f4f6db8a067d6f8b (diff)
downloadRustAndDust-b4c304514291ecabb75821163d46b370a1c2290c.zip
RustAndDust-b4c304514291ecabb75821163d46b370a1c2290c.tar.gz
Map: only hq can order moves
Diffstat (limited to 'core/src/ch/asynk/tankontank')
-rw-r--r--core/src/ch/asynk/tankontank/game/Map.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Map.java b/core/src/ch/asynk/tankontank/game/Map.java
index 8751a87..869d7e7 100644
--- a/core/src/ch/asynk/tankontank/game/Map.java
+++ b/core/src/ch/asynk/tankontank/game/Map.java
@@ -124,13 +124,15 @@ public abstract class Map extends Board
enableMoveAssist(false);
moveAssist.clear();
buildNeighbours(hex);
- for (int i = 0; i < 6; i++) {
- GridPoint2 neighbour = neighbours[i];
- Hex h = getHexSafe(neighbour);
- if (h != null) {
- Pawn p = h.getTopPawn();
- if ((p != null) && (!pawn.isEnemy(p)))
- moveAssist.add(neighbour);
+ if (pawn.isHq()) {
+ for (int i = 0; i < 6; i++) {
+ GridPoint2 neighbour = neighbours[i];
+ Hex h = getHexSafe(neighbour);
+ if (h != null) {
+ Pawn p = h.getTopPawn();
+ if ((p != null) && (!pawn.isEnemy(p)))
+ moveAssist.add(neighbour);
+ }
}
}
enableMoveAssist(true);