From 40f965444584b7726c1a2df7612d2b70f242a627 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Sun, 16 Nov 2014 00:01:10 +0100 Subject: Map: add boolean enterBoard(Pawn pawn, Hex to, Orientation entry) --- core/src/ch/asynk/tankontank/game/Map.java | 5 +++++ 1 file changed, 5 insertions(+) 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; -- cgit v1.1-2-g2b99