summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/rustanddust/game
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2015-12-09 14:55:00 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2015-12-09 14:55:00 +0100
commit4b49e456ef6e98127c953ff67c5d71f40c571f02 (patch)
treeaa15c2a0fe226d81123f5c9450cc263fd9f59aee /core/src/ch/asynk/rustanddust/game
parent5b93add487fc94a1019189b6d406fa7c6317da0a (diff)
downloadRustAndDust-4b49e456ef6e98127c953ff67c5d71f40c571f02.zip
RustAndDust-4b49e456ef6e98127c953ff67c5d71f40c571f02.tar.gz
Player: addUnit and removeUnit are private and used
Diffstat (limited to 'core/src/ch/asynk/rustanddust/game')
-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);