summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank/engine
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-11-14 16:49:03 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2014-11-14 16:49:03 +0100
commitddded613557f36c58b9cfcfecf2932cbd9895afb (patch)
treebc72d12273e0588d750e9204c8c392a3fcd21465 /core/src/ch/asynk/tankontank/engine
parent0c05da84f8b1bb250dfcac810cfd639986506cef (diff)
downloadRustAndDust-ddded613557f36c58b9cfcfecf2932cbd9895afb.zip
RustAndDust-ddded613557f36c58b9cfcfecf2932cbd9895afb.tar.gz
Pawn: protect against HQ activation move debug
Diffstat (limited to 'core/src/ch/asynk/tankontank/engine')
-rw-r--r--core/src/ch/asynk/tankontank/engine/Pawn.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Pawn.java b/core/src/ch/asynk/tankontank/engine/Pawn.java
index 423824b..7f2d688 100644
--- a/core/src/ch/asynk/tankontank/engine/Pawn.java
+++ b/core/src/ch/asynk/tankontank/engine/Pawn.java
@@ -59,7 +59,9 @@ public abstract class Pawn implements Moveable, Disposable
public String toString()
{
- if (from == null)
+ if (to == null)
+ return "move : HQ activation";
+ else if (from == null)
return "move : reinforcement -> [" + to.col + ";" + to.row + ";" + orientation + "] dist:" + distance + " cost:" + cost + " road:" + roadMarch + " entry:" + entryMove;
else
return "move : [" + from.col + ";" + from.row + "] -> [" + to.col + ";" + to.row + ";" + orientation + "] dist:" + distance + " cost:" + cost + " road:" + roadMarch + " entry:" + entryMove;