diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2015-02-18 21:22:00 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2015-02-18 21:22:00 +0100 |
commit | 50c7bb777aa3608a359d196fe26ef2cdd63db76d (patch) | |
tree | 42ca664cadfbcf4eec498766086d7b2ba9484a08 /core/src/ch/asynk/tankontank/game | |
parent | 13bac1f16fb2706320943a397bdd2ffdf9aaba71 (diff) | |
download | RustAndDust-50c7bb777aa3608a359d196fe26ef2cdd63db76d.zip RustAndDust-50c7bb777aa3608a359d196fe26ef2cdd63db76d.tar.gz |
Command: implements Comparable<Pawn>
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); |