summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-11-01 19:32:37 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2014-11-01 19:32:37 +0100
commit5e699973edce0f580a599ea021e074102f5b87cc (patch)
tree067e731f5986d95f264b0421857472eb2b7c8eb1 /core/src/ch/asynk/tankontank
parentd092218b596ae157d4432161626a084f4b7448c8 (diff)
downloadRustAndDust-5e699973edce0f580a599ea021e074102f5b87cc.zip
RustAndDust-5e699973edce0f580a599ea021e074102f5b87cc.tar.gz
Player: add int unitsLeft()
Diffstat (limited to 'core/src/ch/asynk/tankontank')
-rw-r--r--core/src/ch/asynk/tankontank/engine/Player.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Player.java b/core/src/ch/asynk/tankontank/engine/Player.java
index aa9224f..5022769 100644
--- a/core/src/ch/asynk/tankontank/engine/Player.java
+++ b/core/src/ch/asynk/tankontank/engine/Player.java
@@ -24,6 +24,11 @@ public abstract class Player
this.reinforcement = new ArrayList<Pawn>(n);
}
+ public int unitsLeft()
+ {
+ return (units.size() + reinforcement.size());
+ }
+
public String getName()
{
return faction.toString();