summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk/tankontank')
-rw-r--r--core/src/ch/asynk/tankontank/engine/Zone.java (renamed from core/src/ch/asynk/tankontank/engine/EntryPoint.java)4
-rw-r--r--core/src/ch/asynk/tankontank/game/Battle.java4
-rw-r--r--core/src/ch/asynk/tankontank/game/battles/BattleCommon.java28
-rw-r--r--core/src/ch/asynk/tankontank/game/battles/BattleCounterAttack.java19
-rw-r--r--core/src/ch/asynk/tankontank/game/battles/BattleFrontalAssault.java10
-rw-r--r--core/src/ch/asynk/tankontank/game/battles/BattleHeadToHead.java10
-rw-r--r--core/src/ch/asynk/tankontank/game/battles/BattleLastStand.java14
-rw-r--r--core/src/ch/asynk/tankontank/game/states/StateDeployment.java26
-rw-r--r--core/src/ch/asynk/tankontank/game/states/StateMove.java1
-rw-r--r--core/src/ch/asynk/tankontank/game/states/StateReinforcement.java24
10 files changed, 70 insertions, 70 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/EntryPoint.java b/core/src/ch/asynk/tankontank/engine/Zone.java
index adab84c..f0c957b 100644
--- a/core/src/ch/asynk/tankontank/engine/EntryPoint.java
+++ b/core/src/ch/asynk/tankontank/engine/Zone.java
@@ -1,11 +1,11 @@
package ch.asynk.tankontank.engine;
-public class EntryPoint extends TileSet
+public class Zone extends TileSet
{
public int allowedMoves;
public Orientation orientation;
- public EntryPoint(Board board, int n)
+ public Zone(Board board, int n)
{
super(board, n);
}
diff --git a/core/src/ch/asynk/tankontank/game/Battle.java b/core/src/ch/asynk/tankontank/game/Battle.java
index cffbc75..99b51a0 100644
--- a/core/src/ch/asynk/tankontank/game/Battle.java
+++ b/core/src/ch/asynk/tankontank/game/Battle.java
@@ -1,6 +1,6 @@
package ch.asynk.tankontank.game;
-import ch.asynk.tankontank.engine.EntryPoint;
+import ch.asynk.tankontank.engine.Zone;
import ch.asynk.tankontank.game.Unit;
import ch.asynk.tankontank.game.Player;
import ch.asynk.tankontank.game.hud.Position;
@@ -19,7 +19,7 @@ public interface Battle
public boolean getReinforcement(Ctrl ctrl, Map map);
- public EntryPoint getEntryPoint(Unit unit);
+ public Zone getEntryZone(Unit unit);
public Position getHudPosition(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 49aa52c..0a87de0 100644
--- a/core/src/ch/asynk/tankontank/game/battles/BattleCommon.java
+++ b/core/src/ch/asynk/tankontank/game/battles/BattleCommon.java
@@ -5,7 +5,7 @@ import java.util.HashMap;
import java.util.ArrayList;
import ch.asynk.tankontank.engine.TileSet;
-import ch.asynk.tankontank.engine.EntryPoint;
+import ch.asynk.tankontank.engine.Zone;
import ch.asynk.tankontank.game.Army;
import ch.asynk.tankontank.game.Battle;
import ch.asynk.tankontank.game.Player;
@@ -21,9 +21,9 @@ public abstract class BattleCommon implements Battle
protected Factory factory;
protected Player usPlayer;
protected Player gePlayer;
- protected ArrayList<EntryPoint> entryPoints = new ArrayList<EntryPoint>();
- protected ArrayList<EntryPoint> exitPoints = new ArrayList<EntryPoint>();
- protected HashMap<Unit, EntryPoint> pawnEntry = new HashMap<Unit, EntryPoint>();
+ protected ArrayList<Zone> entryZone = new ArrayList<Zone>();
+ protected ArrayList<Zone> exitZone = new ArrayList<Zone>();
+ protected HashMap<Unit, Zone> unitEntry = new HashMap<Unit, Zone>();
protected TileSet objectives;
public BattleCommon(Factory factory)
@@ -48,31 +48,31 @@ public abstract class BattleCommon implements Battle
return description;
}
- public EntryPoint getEntryPoint(Unit unit)
+ public Zone getEntryZone(Unit unit)
{
- return pawnEntry.get(unit);
+ return unitEntry.get(unit);
}
- public void addEntryPoint(EntryPoint entry)
+ public void addEntryZone(Zone entry)
{
- entryPoints.add(entry);
+ entryZone.add(entry);
}
- public void addExitPoint(EntryPoint exit)
+ public void addExitZone(Zone exit)
{
- exitPoints.add(exit);
+ exitZone.add(exit);
}
- public void addReinforcement(Player player, EntryPoint entryPoint, UnitId unitId)
+ public void addReinforcement(Player player, Zone entryZone, UnitId unitId)
{
- addReinforcement(player, entryPoint, unitId, false);
+ addReinforcement(player, entryZone, unitId, false);
}
- public void addReinforcement(Player player, EntryPoint entryPoint, UnitId unitId, boolean ace)
+ public void addReinforcement(Player player, Zone entryZone, UnitId unitId, boolean ace)
{
Unit unit = factory.getUnit(unitId);
unit.setAce(ace);
player.addReinforcement(unit);
- pawnEntry.put(unit, entryPoint);
+ unitEntry.put(unit, entryZone);
}
}
diff --git a/core/src/ch/asynk/tankontank/game/battles/BattleCounterAttack.java b/core/src/ch/asynk/tankontank/game/battles/BattleCounterAttack.java
index 361e6e0..5f5f1df 100644
--- a/core/src/ch/asynk/tankontank/game/battles/BattleCounterAttack.java
+++ b/core/src/ch/asynk/tankontank/game/battles/BattleCounterAttack.java
@@ -11,7 +11,7 @@ import ch.asynk.tankontank.game.Unit.UnitId;
import ch.asynk.tankontank.game.hud.Position;
import ch.asynk.tankontank.engine.Tile;
import ch.asynk.tankontank.engine.TileSet;
-import ch.asynk.tankontank.engine.EntryPoint;
+import ch.asynk.tankontank.engine.Zone;
import ch.asynk.tankontank.engine.Orientation;
public class BattleCounterAttack extends BattleCommon
@@ -70,7 +70,7 @@ public class BattleCounterAttack extends BattleCommon
if (ctrl.player.getTurn() != 5)
return false;
- EntryPoint usEntry = new EntryPoint(map, 9);
+ Zone usEntry = new Zone(map, 9);
usEntry.allowedMoves = (Orientation.SOUTH.s | Orientation.SOUTH_EAST.s | Orientation.SOUTH_WEST.s);
usEntry.add(map.getHex(9, 0));
usEntry.add(map.getHex(9, 1));
@@ -81,7 +81,7 @@ public class BattleCounterAttack extends BattleCommon
usEntry.add(map.getHex(12, 6));
usEntry.add(map.getHex(12, 7));
usEntry.add(map.getHex(13, 8));
- addEntryPoint(usEntry);
+ addEntryZone(usEntry);
addReinforcement(usPlayer, usEntry, UnitId.US_SHERMAN);
addReinforcement(usPlayer, usEntry, UnitId.US_SHERMAN);
@@ -110,7 +110,7 @@ public class BattleCounterAttack extends BattleCommon
Player gePlayer = ctrl.getPlayer(Army.GE);
Player usPlayer = ctrl.getPlayer(Army.US);
- EntryPoint geEntry = new EntryPoint(map, 18);
+ Zone geEntry = new Zone(map, 18);
geEntry.orientation = Orientation.NORTH;
for (int i = 0; i < 2; i++) {
geEntry.add(map.getHex((1 + i), 0));
@@ -123,7 +123,7 @@ public class BattleCounterAttack extends BattleCommon
geEntry.add(map.getHex((4 + i), 7));
geEntry.add(map.getHex((5 + i), 8));
}
- addEntryPoint(geEntry);
+ addEntryZone(geEntry);
addReinforcement(gePlayer, geEntry, UnitId.GE_TIGER);
addReinforcement(gePlayer, geEntry, UnitId.GE_TIGER);
@@ -136,7 +136,7 @@ public class BattleCounterAttack extends BattleCommon
addReinforcement(gePlayer, geEntry, UnitId.GE_PANZER_IV);
addReinforcement(gePlayer, geEntry, UnitId.GE_WESPE);
- EntryPoint geExit = new EntryPoint(map, 9);
+ Zone geExit = new Zone(map, 9);
geExit.allowedMoves = (Orientation.NORTH.s | Orientation.NORTH_EAST.s | Orientation.NORTH_WEST.s);
geExit.add(map.getHex(9, 0));
geExit.add(map.getHex(9, 1));
@@ -147,9 +147,9 @@ public class BattleCounterAttack extends BattleCommon
geExit.add(map.getHex(12, 6));
geExit.add(map.getHex(12, 7));
geExit.add(map.getHex(13, 8));
- addExitPoint(geExit);
+ addExitZone(geExit);
- EntryPoint usEntry = new EntryPoint(map, 36);
+ Zone usEntry = new Zone(map, 36);
usEntry.orientation = Orientation.SOUTH;
for (int i = 0; i < 4; i++) {
usEntry.add(map.getHex((6 + i), 0));
@@ -162,7 +162,7 @@ public class BattleCounterAttack extends BattleCommon
usEntry.add(map.getHex((9 + i), 7));
usEntry.add(map.getHex((10 + i), 8));
}
- addEntryPoint(usEntry);
+ addEntryZone(usEntry);
addReinforcement(usPlayer, usEntry, UnitId.US_WOLVERINE);
addReinforcement(usPlayer, usEntry, UnitId.US_WOLVERINE);
@@ -170,6 +170,5 @@ public class BattleCounterAttack extends BattleCommon
addReinforcement(usPlayer, usEntry, UnitId.US_SHERMAN_HQ);
addReinforcement(usPlayer, usEntry, UnitId.US_SHERMAN);
addReinforcement(usPlayer, usEntry, UnitId.US_SHERMAN);
-
}
}
diff --git a/core/src/ch/asynk/tankontank/game/battles/BattleFrontalAssault.java b/core/src/ch/asynk/tankontank/game/battles/BattleFrontalAssault.java
index ef5f79b..992c81a 100644
--- a/core/src/ch/asynk/tankontank/game/battles/BattleFrontalAssault.java
+++ b/core/src/ch/asynk/tankontank/game/battles/BattleFrontalAssault.java
@@ -11,7 +11,7 @@ import ch.asynk.tankontank.game.Unit.UnitId;
import ch.asynk.tankontank.game.hud.Position;
import ch.asynk.tankontank.engine.Tile;
import ch.asynk.tankontank.engine.TileSet;
-import ch.asynk.tankontank.engine.EntryPoint;
+import ch.asynk.tankontank.engine.Zone;
import ch.asynk.tankontank.engine.Orientation;
public class BattleFrontalAssault extends BattleCommon
@@ -99,7 +99,7 @@ public class BattleFrontalAssault extends BattleCommon
objectives.add(map.getHex(6, 1));
objectives.enable(Hex.OBJECTIVE, true);
- EntryPoint geEntry = new EntryPoint(map, 38);
+ Zone geEntry = new Zone(map, 38);
geEntry.orientation = Orientation.NORTH_WEST;
for (int i = 2; i < 12; i++)
geEntry.add(map.getHex(i, 4));
@@ -109,7 +109,7 @@ public class BattleFrontalAssault extends BattleCommon
geEntry.add(map.getHex(i, 2));
for (int i = 1; i < 10; i++)
geEntry.add(map.getHex(i, 1));
- addEntryPoint(geEntry);
+ addEntryZone(geEntry);
addReinforcement(gePlayer, geEntry, UnitId.GE_TIGER);
addReinforcement(gePlayer, geEntry, UnitId.GE_TIGER);
@@ -120,13 +120,13 @@ public class BattleFrontalAssault extends BattleCommon
addReinforcement(gePlayer, geEntry, UnitId.GE_PANZER_IV);
addReinforcement(gePlayer, geEntry, UnitId.GE_PANZER_IV);
- EntryPoint usEntry = new EntryPoint(map, 19);
+ Zone usEntry = new Zone(map, 19);
usEntry.orientation = Orientation.SOUTH_EAST;
for (int i = 4; i < 14; i++)
usEntry.add(map.getHex(i, 8));
for (int i = 4; i < 13; i++)
usEntry.add(map.getHex(i, 7));
- addEntryPoint(usEntry);
+ addEntryZone(usEntry);
addReinforcement(usPlayer, usEntry, UnitId.US_PRIEST);
addReinforcement(usPlayer, usEntry, UnitId.US_WOLVERINE);
diff --git a/core/src/ch/asynk/tankontank/game/battles/BattleHeadToHead.java b/core/src/ch/asynk/tankontank/game/battles/BattleHeadToHead.java
index 253bf90..4ab72a3 100644
--- a/core/src/ch/asynk/tankontank/game/battles/BattleHeadToHead.java
+++ b/core/src/ch/asynk/tankontank/game/battles/BattleHeadToHead.java
@@ -11,7 +11,7 @@ import ch.asynk.tankontank.game.Unit.UnitId;
import ch.asynk.tankontank.game.hud.Position;
import ch.asynk.tankontank.engine.Tile;
import ch.asynk.tankontank.engine.TileSet;
-import ch.asynk.tankontank.engine.EntryPoint;
+import ch.asynk.tankontank.engine.Zone;
import ch.asynk.tankontank.engine.Orientation;
public class BattleHeadToHead extends BattleCommon
@@ -105,7 +105,7 @@ public class BattleHeadToHead extends BattleCommon
objectives.add(map.getHex(6, 1));
objectives.enable(Hex.OBJECTIVE, true);
- EntryPoint geEntry = new EntryPoint(map, 9);
+ Zone geEntry = new Zone(map, 9);
geEntry.allowedMoves = (Orientation.NORTH.s | Orientation.NORTH_EAST.s | Orientation.NORTH_WEST.s);
geEntry.add(map.getHex(0, 0));
geEntry.add(map.getHex(1, 1));
@@ -116,7 +116,7 @@ public class BattleHeadToHead extends BattleCommon
geEntry.add(map.getHex(3, 6));
geEntry.add(map.getHex(4, 7));
geEntry.add(map.getHex(4, 8));
- addEntryPoint(geEntry);
+ addEntryZone(geEntry);
addReinforcement(gePlayer, geEntry, UnitId.GE_TIGER);
addReinforcement(gePlayer, geEntry, UnitId.GE_TIGER);
@@ -128,7 +128,7 @@ public class BattleHeadToHead extends BattleCommon
addReinforcement(gePlayer, geEntry, UnitId.GE_PANZER_IV);
- EntryPoint usEntry = new EntryPoint(map, 9);
+ Zone usEntry = new Zone(map, 9);
usEntry.allowedMoves = (Orientation.SOUTH.s | Orientation.SOUTH_EAST.s | Orientation.SOUTH_WEST.s);
usEntry.add(map.getHex(9, 0));
usEntry.add(map.getHex(9, 1));
@@ -139,7 +139,7 @@ public class BattleHeadToHead extends BattleCommon
usEntry.add(map.getHex(12, 6));
usEntry.add(map.getHex(12, 7));
usEntry.add(map.getHex(13, 8));
- addEntryPoint(usEntry);
+ addEntryZone(usEntry);
addReinforcement(usPlayer, usEntry, UnitId.US_PRIEST);
addReinforcement(usPlayer, usEntry, UnitId.US_WOLVERINE);
diff --git a/core/src/ch/asynk/tankontank/game/battles/BattleLastStand.java b/core/src/ch/asynk/tankontank/game/battles/BattleLastStand.java
index c623ce3..74e23ac 100644
--- a/core/src/ch/asynk/tankontank/game/battles/BattleLastStand.java
+++ b/core/src/ch/asynk/tankontank/game/battles/BattleLastStand.java
@@ -11,7 +11,7 @@ import ch.asynk.tankontank.game.Unit.UnitId;
import ch.asynk.tankontank.game.hud.Position;
import ch.asynk.tankontank.engine.Tile;
import ch.asynk.tankontank.engine.TileSet;
-import ch.asynk.tankontank.engine.EntryPoint;
+import ch.asynk.tankontank.engine.Zone;
import ch.asynk.tankontank.engine.Orientation;
public class BattleLastStand extends BattleCommon
@@ -107,7 +107,7 @@ public class BattleLastStand extends BattleCommon
objectives.add(map.getHex(1, 2));
objectives.enable(Hex.OBJECTIVE, true);
- EntryPoint geEntry = new EntryPoint(map, 7);
+ Zone geEntry = new Zone(map, 7);
geEntry.orientation = Orientation.NORTH;
geEntry.add(map.getHex(5, 5));
geEntry.add(map.getHex(4, 4));
@@ -116,13 +116,13 @@ public class BattleLastStand extends BattleCommon
geEntry.add(map.getHex(6, 4));
geEntry.add(map.getHex(6, 5));
geEntry.add(map.getHex(5, 4));
- addEntryPoint(geEntry);
+ addEntryZone(geEntry);
addReinforcement(gePlayer, geEntry, UnitId.GE_TIGER, true);
addReinforcement(gePlayer, geEntry, UnitId.GE_TIGER);
addReinforcement(gePlayer, geEntry, UnitId.GE_TIGER);
- geEntry = new EntryPoint(map, 32);
+ geEntry = new Zone(map, 32);
geEntry.orientation = Orientation.NORTH;
for (int i = 0; i < 4; i++) {
geEntry.add(map.getHex(i, 0));
@@ -137,12 +137,12 @@ public class BattleLastStand extends BattleCommon
geEntry.add(map.getHex((i + 3), 5));
geEntry.add(map.getHex((i + 4), 7));
}
- addEntryPoint(geEntry);
+ addEntryZone(geEntry);
addReinforcement(gePlayer, geEntry, UnitId.GE_PANZER_IV);
addReinforcement(gePlayer, geEntry, UnitId.GE_WESPE);
- EntryPoint usEntry = new EntryPoint(map, 11);
+ Zone usEntry = new Zone(map, 11);
usEntry.orientation = Orientation.SOUTH;
usEntry.add(map.getHex(9, 0));
usEntry.add(map.getHex(9, 1));
@@ -155,7 +155,7 @@ public class BattleLastStand extends BattleCommon
usEntry.add(map.getHex(13, 8));
usEntry.add(map.getHex(10, 4));
usEntry.add(map.getHex(11, 6));
- addEntryPoint(usEntry);
+ addEntryZone(usEntry);
addReinforcement(usPlayer, usEntry, UnitId.US_WOLVERINE);
addReinforcement(usPlayer, usEntry, UnitId.US_WOLVERINE);
diff --git a/core/src/ch/asynk/tankontank/game/states/StateDeployment.java b/core/src/ch/asynk/tankontank/game/states/StateDeployment.java
index a30d59c..c3944bc 100644
--- a/core/src/ch/asynk/tankontank/game/states/StateDeployment.java
+++ b/core/src/ch/asynk/tankontank/game/states/StateDeployment.java
@@ -1,7 +1,7 @@
package ch.asynk.tankontank.game.states;
import ch.asynk.tankontank.engine.Orientation;
-import ch.asynk.tankontank.engine.EntryPoint;
+import ch.asynk.tankontank.engine.Zone;
import ch.asynk.tankontank.engine.PawnSet;
import ch.asynk.tankontank.game.Hex;
import ch.asynk.tankontank.game.Unit;
@@ -12,7 +12,7 @@ import ch.asynk.tankontank.TankOnTank;
public class StateDeployment extends StateCommon
{
private boolean done;
- private EntryPoint entryPoint;
+ private Zone entryZone;
private PawnSet deployedUnits = new PawnSet(map, 10);
@Override
@@ -21,7 +21,7 @@ public class StateDeployment extends StateCommon
if (selectedHex != null)
map.unselectHex(selectedHex);
done = false;
- entryPoint = null;
+ entryZone = null;
selectedHex = null;
ctrl.hud.actionButtons.hide();
ctrl.hud.playerInfo.unitDock.show();
@@ -33,8 +33,8 @@ public class StateDeployment extends StateCommon
{
if (selectedHex != null)
map.unselectHex(selectedHex);
- if (entryPoint != null)
- entryPoint.enable(Hex.AREA, false);
+ if (entryZone != null)
+ entryZone.enable(Hex.AREA, false);
ctrl.hud.playerInfo.unitDock.hide();
}
@@ -68,8 +68,8 @@ public class StateDeployment extends StateCommon
Orientation o = Orientation.fromAdj(selectedHex, upHex);
if (o != Orientation.KEEP)
doRotation(o);
- } else if (!done && (entryPoint != null) && (upHex != null)) {
- if (upHex.isEmpty() && entryPoint.contains(upHex))
+ } else if (!done && (entryZone != null) && (upHex != null)) {
+ if (upHex.isEmpty() && entryZone.contains(upHex))
unitEnter(activeUnit);
} else {
unit = downHex.getUnit();
@@ -84,9 +84,9 @@ public class StateDeployment extends StateCommon
private void changeUnit(Unit unit)
{
activeUnit = unit;
- if (entryPoint != null) entryPoint.enable(Hex.AREA, false);
- entryPoint = ctrl.battle.getEntryPoint(activeUnit);
- entryPoint.enable(Hex.AREA, true);
+ if (entryZone != null) entryZone.enable(Hex.AREA, false);
+ entryZone = ctrl.battle.getEntryZone(activeUnit);
+ entryZone.enable(Hex.AREA, true);
}
private void undo()
@@ -105,9 +105,9 @@ public class StateDeployment extends StateCommon
selectedUnit = unit;
selectedHex = upHex;
ctrl.player.unitEntry(unit);
- map.enterBoard(unit, upHex, entryPoint.orientation);
+ map.enterBoard(unit, upHex, entryZone.orientation);
deployedUnits.add(unit);
- entryPoint.enable(Hex.AREA, false);
+ entryZone.enable(Hex.AREA, false);
showRotation();
ctrl.hud.update();
}
@@ -128,7 +128,7 @@ public class StateDeployment extends StateCommon
selectedUnit.setRotation(o.r());
ctrl.hud.actionButtons.hide();
ctrl.hud.playerInfo.unitDock.show();
- entryPoint = null;
+ entryZone = null;
activeUnit = null;
selectedUnit = null;
if (ctrl.checkDeploymentDone()) {
diff --git a/core/src/ch/asynk/tankontank/game/states/StateMove.java b/core/src/ch/asynk/tankontank/game/states/StateMove.java
index 3d3dbe0..a6747d0 100644
--- a/core/src/ch/asynk/tankontank/game/states/StateMove.java
+++ b/core/src/ch/asynk/tankontank/game/states/StateMove.java
@@ -1,5 +1,6 @@
package ch.asynk.tankontank.game.states;
+import ch.asynk.tankontank.engine.Zone;
import ch.asynk.tankontank.game.Hex;
import ch.asynk.tankontank.game.Unit;
import ch.asynk.tankontank.game.hud.ActionButtons.Buttons;
diff --git a/core/src/ch/asynk/tankontank/game/states/StateReinforcement.java b/core/src/ch/asynk/tankontank/game/states/StateReinforcement.java
index 33668db..634ee00 100644
--- a/core/src/ch/asynk/tankontank/game/states/StateReinforcement.java
+++ b/core/src/ch/asynk/tankontank/game/states/StateReinforcement.java
@@ -1,13 +1,13 @@
package ch.asynk.tankontank.game.states;
-import ch.asynk.tankontank.engine.EntryPoint;
+import ch.asynk.tankontank.engine.Zone;
import ch.asynk.tankontank.game.Hex;
import ch.asynk.tankontank.game.Unit;
import ch.asynk.tankontank.game.hud.ActionButtons.Buttons;
public class StateReinforcement extends StateCommon
{
- private EntryPoint entryPoint;
+ private Zone entryZone;
@Override
public void enter(StateType prevState)
@@ -15,7 +15,7 @@ public class StateReinforcement extends StateCommon
map.clearAll();
if (selectedHex != null)
map.unselectHex(selectedHex);
- entryPoint = null;
+ entryZone = null;
selectedHex = null;
ctrl.hud.playerInfo.unitDock.show();
}
@@ -25,8 +25,8 @@ public class StateReinforcement extends StateCommon
{
if (selectedHex != null)
map.unselectHex(selectedHex);
- if (entryPoint != null)
- entryPoint.enable(Hex.AREA, false);
+ if (entryZone != null)
+ entryZone.enable(Hex.AREA, false);
ctrl.hud.playerInfo.unitDock.hide();
}
@@ -53,7 +53,7 @@ public class StateReinforcement extends StateCommon
Unit unit = ctrl.hud.playerInfo.unitDock.selectedUnit;
if ((unit != null) && (unit != activeUnit))
changeUnit(unit);
- else if ((entryPoint != null) && upHex.isEmpty() && entryPoint.contains(upHex))
+ else if ((entryZone != null) && upHex.isEmpty() && entryZone.contains(upHex))
unitEnter(activeUnit);
else
ctrl.setState(StateType.SELECT);
@@ -62,10 +62,10 @@ public class StateReinforcement extends StateCommon
private void changeUnit(Unit unit)
{
activeUnit = unit;
- if (entryPoint != null)
- entryPoint.enable(Hex.AREA, false);
- entryPoint = ctrl.battle.getEntryPoint(activeUnit);
- entryPoint.enable(Hex.AREA, true);
+ if (entryZone != null)
+ entryZone.enable(Hex.AREA, false);
+ entryZone = ctrl.battle.getEntryZone(activeUnit);
+ entryZone.enable(Hex.AREA, true);
ctrl.hud.actionButtons.show(((ctrl.cfg.canCancel) ? Buttons.ABORT.b : 0));
}
@@ -74,9 +74,9 @@ public class StateReinforcement extends StateCommon
selectedUnit = unit;
selectedHex = upHex;
map.selectHex(selectedHex);
- entryPoint.enable(Hex.AREA, false);
+ entryZone.enable(Hex.AREA, false);
ctrl.player.unitEntry(unit);
- if (map.enterBoard(unit, upHex, entryPoint.allowedMoves)) {
+ if (map.enterBoard(unit, upHex, entryZone.allowedMoves)) {
if (unit.getMovementPoints() > 0)
ctrl.setState(StateType.MOVE);
else