summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-11-16 00:01:10 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2014-11-16 00:01:10 +0100
commit40f965444584b7726c1a2df7612d2b70f242a627 (patch)
tree4a293f56875329d474dd6295dde2b38b3577b7d6 /core/src/ch/asynk
parentdfe77e1532120e1e98ea4e7467c6e570362b30c2 (diff)
downloadRustAndDust-40f965444584b7726c1a2df7612d2b70f242a627.zip
RustAndDust-40f965444584b7726c1a2df7612d2b70f242a627.tar.gz
Map: add boolean enterBoard(Pawn pawn, Hex to, Orientation entry)
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r--core/src/ch/asynk/tankontank/game/Map.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Map.java b/core/src/ch/asynk/tankontank/game/Map.java
index 26bc0b2..f077dd6 100644
--- a/core/src/ch/asynk/tankontank/game/Map.java
+++ b/core/src/ch/asynk/tankontank/game/Map.java
@@ -172,6 +172,11 @@ public abstract class Map extends Board
Orientation entry = findBestEntry(pawn, to, allowedMoves);
if (entry == Orientation.KEEP)
return false;
+ return enterBoard(pawn, to, entry);
+ }
+
+ public boolean enterBoard(Pawn pawn, Hex to, Orientation entry)
+ {
pawn.enterBoard(to, entry);
setPawnOnto(pawn, to, entry);
return true;