diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-05 17:13:11 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-05 17:13:11 +0100 |
commit | e21ec55eb6d382fff6741abbb7e5bc192d5b700f (patch) | |
tree | 8d57d7cbc8a7ee206caffe9ccfa7b0b6bb667b3f | |
parent | 7d5d184cd43746a8b46a2deac4ecdd61065642be (diff) | |
download | RustAndDust-e21ec55eb6d382fff6741abbb7e5bc192d5b700f.zip RustAndDust-e21ec55eb6d382fff6741abbb7e5bc192d5b700f.tar.gz |
Pawn: add enterBoard(Tile, Orientation)
-rw-r--r-- | core/src/ch/asynk/tankontank/engine/Pawn.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Pawn.java b/core/src/ch/asynk/tankontank/engine/Pawn.java index c7d8b26..049ff3e 100644 --- a/core/src/ch/asynk/tankontank/engine/Pawn.java +++ b/core/src/ch/asynk/tankontank/engine/Pawn.java @@ -157,6 +157,16 @@ public abstract class Pawn implements Moveable, Disposable move.reset(); } + public void enterBoard(Tile to, Orientation o) + { + move.to = to; + move.from = null; + move.entryMove = true; + move.orientation = o; + move.cost = to.costFrom(this, o); + move(); + } + public boolean isEnemy(Faction other) { return faction.isEnemy(other); |