summaryrefslogtreecommitdiffstats
path: root/core/src/ch
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-11-05 17:13:11 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2014-11-05 17:13:11 +0100
commite21ec55eb6d382fff6741abbb7e5bc192d5b700f (patch)
tree8d57d7cbc8a7ee206caffe9ccfa7b0b6bb667b3f /core/src/ch
parent7d5d184cd43746a8b46a2deac4ecdd61065642be (diff)
downloadRustAndDust-e21ec55eb6d382fff6741abbb7e5bc192d5b700f.zip
RustAndDust-e21ec55eb6d382fff6741abbb7e5bc192d5b700f.tar.gz
Pawn: add enterBoard(Tile, Orientation)
Diffstat (limited to 'core/src/ch')
-rw-r--r--core/src/ch/asynk/tankontank/engine/Pawn.java10
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);