From 7d5d184cd43746a8b46a2deac4ecdd61065642be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Wed, 5 Nov 2014 17:12:34 +0100 Subject: Player: add unitEntry(Pawn) and revertUnitEntry(Pawn) --- core/src/ch/asynk/tankontank/engine/Player.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/core/src/ch/asynk/tankontank/engine/Player.java b/core/src/ch/asynk/tankontank/engine/Player.java index 385a3ae..fa6a923 100644 --- a/core/src/ch/asynk/tankontank/engine/Player.java +++ b/core/src/ch/asynk/tankontank/engine/Player.java @@ -65,6 +65,18 @@ public abstract class Player reinforcement.add(pawn); } + public void unitEntry(Pawn pawn) + { + reinforcement.remove(pawn); + units.add(pawn); + } + + public void revertUnitEntry(Pawn pawn) + { + units.remove(pawn); + reinforcement.add(pawn); + } + public void casualty(Pawn pawn) { units.remove(pawn); -- cgit v1.1-2-g2b99