From 5e699973edce0f580a599ea021e074102f5b87cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Sat, 1 Nov 2014 19:32:37 +0100 Subject: Player: add int unitsLeft() --- core/src/ch/asynk/tankontank/engine/Player.java | 5 +++++ 1 file changed, 5 insertions(+) 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(n); } + public int unitsLeft() + { + return (units.size() + reinforcement.size()); + } + public String getName() { return faction.toString(); -- cgit v1.1-2-g2b99