diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2015-01-12 23:21:20 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2015-01-12 23:21:20 +0100 |
commit | c4be6728ed18678933f6da1e860db98adf483d2d (patch) | |
tree | 6fdc3703b7a825df367476f13cb5c4220ab4465c /core/src/ch/asynk | |
parent | eb02cfedf54d1320217881ca017ce2274b23c6a7 (diff) | |
download | RustAndDust-c4be6728ed18678933f6da1e860db98adf483d2d.zip RustAndDust-c4be6728ed18678933f6da1e860db98adf483d2d.tar.gz |
BattleTest: call setAce() before map.setOnBoard()
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/battles/BattleTest.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/core/src/ch/asynk/tankontank/game/battles/BattleTest.java b/core/src/ch/asynk/tankontank/game/battles/BattleTest.java index dfaf9fc..16f537e 100644 --- a/core/src/ch/asynk/tankontank/game/battles/BattleTest.java +++ b/core/src/ch/asynk/tankontank/game/battles/BattleTest.java @@ -65,7 +65,13 @@ public class BattleTest extends BattleCommon private Unit setUnit(Map map, Player player, UnitId unitId, int col, int row, Orientation orientation) { + return setUnit(map, player, unitId, col, row, orientation, false); + } + + private Unit setUnit(Map map, Player player, UnitId unitId, int col, int row, Orientation orientation, boolean ace) + { Unit u = factory.getUnit(unitId); + u.setAce(ace); player.addUnit(u); map.setOnBoard(u, map.getHex(col, row), orientation); return u; @@ -91,7 +97,7 @@ public class BattleTest extends BattleCommon usPlayer.casualty(factory.getUnit(UnitId.US_SHERMAN_HQ)); setUnit(map, usPlayer, UnitId.US_PRIEST, 10, 8, Orientation.SOUTH_EAST); - setUnit(map, usPlayer, UnitId.US_SHERMAN, 7, 3, Orientation.SOUTH).setAce(true); + setUnit(map, usPlayer, UnitId.US_SHERMAN, 7, 3, Orientation.SOUTH, true); setUnit(map, usPlayer, UnitId.US_SHERMAN_HQ, 8, 4, Orientation.SOUTH); setUnit(map, usPlayer, UnitId.US_WOLVERINE, 9, 7, Orientation.SOUTH_EAST); setUnit(map, usPlayer, UnitId.US_SHERMAN, 6, 6, Orientation.NORTH_EAST); |