summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/rustanddust/game
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2015-12-26 23:32:45 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2015-12-26 23:32:45 +0100
commitdca8d22acbdd6b3ffd38050e08f969384d302555 (patch)
tree8914b7e1801208d53bc779b3943eed2d79dd6847 /core/src/ch/asynk/rustanddust/game
parentc6738b228b353b4e36ab4cebcd2f57fecd194ab4 (diff)
downloadRustAndDust-dca8d22acbdd6b3ffd38050e08f969384d302555.zip
RustAndDust-dca8d22acbdd6b3ffd38050e08f969384d302555.tar.gz
StateWithdraw: add debug error if many paths
Diffstat (limited to 'core/src/ch/asynk/rustanddust/game')
-rw-r--r--core/src/ch/asynk/rustanddust/game/states/StateWithdraw.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/states/StateWithdraw.java b/core/src/ch/asynk/rustanddust/game/states/StateWithdraw.java
index bbdfb4c..4b3e19a 100644
--- a/core/src/ch/asynk/rustanddust/game/states/StateWithdraw.java
+++ b/core/src/ch/asynk/rustanddust/game/states/StateWithdraw.java
@@ -3,6 +3,7 @@ package ch.asynk.rustanddust.game.states;
import ch.asynk.rustanddust.game.Zone;
import ch.asynk.rustanddust.game.Hex;
import ch.asynk.rustanddust.game.Unit;
+import ch.asynk.rustanddust.RustAndDust;
public class StateWithdraw extends StateCommon
{
@@ -42,6 +43,9 @@ public class StateWithdraw extends StateCommon
if (map.pathsTo() == null)
map.pathsBuild(hex);
+ if (map.pathsSize() > 1)
+ RustAndDust.debug("ERROR: pathsSize() == " + map.pathsSize());
+
Hex exitHex = (Hex) map.pathsTo();
if (!exitZone.contains(exitHex))
throw new RuntimeException(String.format("%s not in exitZone", exitHex));