summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-03-31 13:42:05 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2016-03-31 13:42:05 +0200
commit07d59e9ef48774b91b017506fdfb7de13c2327dd (patch)
tree66585ae293d68a38fe11f8ce046e9ae39b4b3313
parent418f4435ba6fdb6ed382c87076216a5f34591ff1 (diff)
downloadRustAndDust-07d59e9ef48774b91b017506fdfb7de13c2327dd.zip
RustAndDust-07d59e9ef48774b91b017506fdfb7de13c2327dd.tar.gz
Map4Orders: remove protected Battle
-rw-r--r--core/src/ch/asynk/rustanddust/game/map/Map4Orders.java14
1 files changed, 6 insertions, 8 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/map/Map4Orders.java b/core/src/ch/asynk/rustanddust/game/map/Map4Orders.java
index fa591cd..b3e8a3d 100644
--- a/core/src/ch/asynk/rustanddust/game/map/Map4Orders.java
+++ b/core/src/ch/asynk/rustanddust/game/map/Map4Orders.java
@@ -15,7 +15,6 @@ import ch.asynk.rustanddust.game.Battle;
public abstract class Map4Orders extends Map3Animations
{
- protected final Battle battle;
protected final OrderList orders;
protected final OrderList replayOrders;
@@ -28,7 +27,6 @@ public abstract class Map4Orders extends Map3Animations
super(game, map, hex);
this.actionId = 0;
- this.battle = game.ctrl.battle;
this.orders = new OrderList(10);
this.replayOrders = new OrderList(10);
}
@@ -94,7 +92,7 @@ public abstract class Map4Orders extends Map3Animations
revertclaim(unit, unit.getHex());
removePawn(unit);
- battle.getPlayer().revertUnitEntry(unit);
+ game.ctrl.battle.getPlayer().revertUnitEntry(unit);
orders.dispose(unit);
unit.reset();
}
@@ -220,16 +218,16 @@ public abstract class Map4Orders extends Map3Animations
case EXIT:
initMove(unit);
movePawn(unit, move, this);
- battle.getPlayer().unitWithdraw(unit);
+ game.ctrl.battle.getPlayer().unitWithdraw(unit);
break;
case SET:
setPawnOnto(unit, move);
- battle.getPlayer().unitEntry(unit);
+ game.ctrl.battle.getPlayer().unitEntry(unit);
claim(unit, move.to);
break;
case ENTER:
enterPawn(unit, move);
- battle.getPlayer().unitEntry(unit);
+ game.ctrl.battle.getPlayer().unitEntry(unit);
claim(unit, move.to);
break;
default:
@@ -251,10 +249,10 @@ public abstract class Map4Orders extends Map3Animations
{
activableUnits.remove(unit);
activatedUnits.add(unit);
- addPromoteAnimation(unit, battle.getPlayer(), new Runnable() {
+ addPromoteAnimation(unit, game.ctrl.battle.getPlayer(), new Runnable() {
@Override
public void run() {
- battle.getPlayer().promote(unit);
+ game.ctrl.battle.getPlayer().promote(unit);
}
});
return true;