diff options
Diffstat (limited to 'core/src/ch/asynk/tankontank/game')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Command.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Command.java b/core/src/ch/asynk/tankontank/game/Command.java index 1f79589..1ac1bb5 100644 --- a/core/src/ch/asynk/tankontank/game/Command.java +++ b/core/src/ch/asynk/tankontank/game/Command.java @@ -6,6 +6,7 @@ import com.badlogic.gdx.utils.JsonValue; import ch.asynk.tankontank.engine.Order; import ch.asynk.tankontank.engine.Move; +import ch.asynk.tankontank.engine.Pawn; public class Command extends Order { @@ -67,6 +68,14 @@ public class Command extends Order } @Override + public int compareTo(Pawn pawn) + { + if (pawn == unit) + return 0; + return 1; + } + + @Override public String toString() { return String.format("%s : %s", type, unit.id); |