From ddded613557f36c58b9cfcfecf2932cbd9895afb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Fri, 14 Nov 2014 16:49:03 +0100 Subject: Pawn: protect against HQ activation move debug --- core/src/ch/asynk/tankontank/engine/Pawn.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- cgit v1.1-2-g2b99