summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/rustanddust
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk/rustanddust')
-rw-r--r--core/src/ch/asynk/rustanddust/game/Player.java23
1 files changed, 14 insertions, 9 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Player.java b/core/src/ch/asynk/rustanddust/game/Player.java
index c5f4506..6aa2657 100644
--- a/core/src/ch/asynk/rustanddust/game/Player.java
+++ b/core/src/ch/asynk/rustanddust/game/Player.java
@@ -92,11 +92,6 @@ public class Player
return withdrawed.size();
}
- public void addUnit(Unit unit)
- {
- units.add(unit);
- }
-
public void addReinforcement(Unit unit)
{
reinforcement.add(unit);
@@ -105,27 +100,37 @@ public class Player
public void unitEntry(Unit unit)
{
reinforcement.remove(unit);
- units.add(unit);
+ addUnit(unit);
}
public void revertUnitEntry(Unit unit)
{
- units.remove(unit);
+ removeUnit(unit);
reinforcement.add(unit);
}
public void casualty(Unit unit)
{
- units.remove(unit);
+ removeUnit(unit);
casualties.add(unit);
}
public void unitWithdraw(Unit unit)
{
- units.remove(unit);
+ removeUnit(unit);
withdrawed.add(unit);
}
+ private void addUnit(Unit unit)
+ {
+ units.add(unit);
+ }
+
+ private void removeUnit(Unit unit)
+ {
+ units.remove(unit);
+ }
+
public int getAp()
{
return ((apSpent < actionPoints) ? (apSpent + 1) : apSpent);