summaryrefslogtreecommitdiffstats
path: root/core/src/ch
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch')
-rw-r--r--core/src/ch/asynk/tankontank/game/Map.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Map.java b/core/src/ch/asynk/tankontank/game/Map.java
index 1df308f..7f9e7ae 100644
--- a/core/src/ch/asynk/tankontank/game/Map.java
+++ b/core/src/ch/asynk/tankontank/game/Map.java
@@ -267,11 +267,15 @@ public abstract class Map extends Board
int activatedUnits = activatedPawns.size();
- if (dice == 2) return false;
- if (dice == 12) return true;
-
- // TODO : flank attack
- boolean success = (dice + activatedUnits >= hex.defenseFor(target, activatedPawns));
+ boolean success;
+ if (dice == 2) {
+ success = false;
+ } else if (dice == 12) {
+ success = true;
+ } else {
+ // TODO : flank attack
+ success = (dice + activatedUnits >= hex.defenseFor(target, activatedPawns));
+ }
// TODO : free move for infantry
for (Pawn p : activatedPawns)