summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r--core/src/ch/asynk/tankontank/game/Ctrl.java6
-rw-r--r--core/src/ch/asynk/tankontank/game/Hud.java5
2 files changed, 10 insertions, 1 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Ctrl.java b/core/src/ch/asynk/tankontank/game/Ctrl.java
index 6ef8eed..a3dafc9 100644
--- a/core/src/ch/asynk/tankontank/game/Ctrl.java
+++ b/core/src/ch/asynk/tankontank/game/Ctrl.java
@@ -159,6 +159,12 @@ public class Ctrl implements Disposable
nextPlayer();
}
+ public void endTurn()
+ {
+ state.abort();
+ nextPlayer();
+ }
+
public void abort()
{
state.abort();
diff --git a/core/src/ch/asynk/tankontank/game/Hud.java b/core/src/ch/asynk/tankontank/game/Hud.java
index d50d8a7..278643e 100644
--- a/core/src/ch/asynk/tankontank/game/Hud.java
+++ b/core/src/ch/asynk/tankontank/game/Hud.java
@@ -168,7 +168,10 @@ public class Hud implements Disposable
if (btn != null)
btn.setOn();
- if (infoRect.contains(x,y)) return true;
+ if (infoRect.contains(x,y)) {
+ ctrl.endTurn();
+ return true;
+ }
if (!buttonsRect.contains(x,y)) return false;
if (btn == moveBtn)