summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'core/src')
-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);