diff options
Diffstat (limited to 'core/src/ch/asynk/tankontank/game')
3 files changed, 22 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Battle.java b/core/src/ch/asynk/tankontank/game/Battle.java index e59db41..ec60ffc 100644 --- a/core/src/ch/asynk/tankontank/game/Battle.java +++ b/core/src/ch/asynk/tankontank/game/Battle.java @@ -1,5 +1,10 @@ package ch.asynk.tankontank.game; +import ch.asynk.tankontank.engine.TileSet; +import ch.asynk.tankontank.engine.Orientation; +import ch.asynk.tankontank.game.Unit; +import ch.asynk.tankontank.game.Player; + public interface Battle { public String getName(); @@ -15,4 +20,8 @@ public interface Battle public void setup(Map map, Player firstPlayer, Player secondPlayer); public boolean checkVictory(Ctrl ctrl); + + public TileSet getEntryPoint(Unit unit); + + public Orientation getEntryOrientation(Player player); } diff --git a/core/src/ch/asynk/tankontank/game/battles/BattleCommon.java b/core/src/ch/asynk/tankontank/game/battles/BattleCommon.java index f6795b0..e22d388 100644 --- a/core/src/ch/asynk/tankontank/game/battles/BattleCommon.java +++ b/core/src/ch/asynk/tankontank/game/battles/BattleCommon.java @@ -60,4 +60,9 @@ public abstract class BattleCommon implements Battle player.addReinforcement(unit); pawnEntry.put(unit, entryPoint); } + + public TileSet getEntryPoint(Unit unit) + { + return pawnEntry.get(unit); + } } diff --git a/core/src/ch/asynk/tankontank/game/battles/BattleHeadToHead.java b/core/src/ch/asynk/tankontank/game/battles/BattleHeadToHead.java index be17509..28fa7dc 100644 --- a/core/src/ch/asynk/tankontank/game/battles/BattleHeadToHead.java +++ b/core/src/ch/asynk/tankontank/game/battles/BattleHeadToHead.java @@ -64,6 +64,14 @@ public class BattleHeadToHead extends BattleCommon } @Override + public Orientation getEntryOrientation(Player player) + { + if (player.isEnemy(Army.GE)) + return Orientation.SOUTH; + return Orientation.NORTH; + } + + @Override public void setup(Map map, Player a, Player b) { Player gePlayer; |