summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-11-16 16:07:19 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2014-11-16 16:07:19 +0100
commitd45fe0d6b1ad80016a4b85709e8d0ec7b15f410d (patch)
treea9f8465c0baf38eebc8173fbe2ce9a18c8b6dc03 /core/src/ch/asynk
parent397bfdac6ce93ea7a72601e216443db690e9e023 (diff)
downloadRustAndDust-d45fe0d6b1ad80016a4b85709e8d0ec7b15f410d.zip
RustAndDust-d45fe0d6b1ad80016a4b85709e8d0ec7b15f410d.tar.gz
Ctrl: add Player getPlayer(Army)
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r--core/src/ch/asynk/tankontank/game/Ctrl.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Ctrl.java b/core/src/ch/asynk/tankontank/game/Ctrl.java
index 6dc1c44..78fdeba 100644
--- a/core/src/ch/asynk/tankontank/game/Ctrl.java
+++ b/core/src/ch/asynk/tankontank/game/Ctrl.java
@@ -86,6 +86,11 @@ public class Ctrl implements Disposable
map.dispose();
}
+ public Player getPlayer(Army army)
+ {
+ return (player.is(army) ? player : opponent);
+ }
+
public boolean isInAction()
{
return (state != selectState);