summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-10-09 14:16:13 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2014-10-09 14:16:13 +0200
commit7983c8ba5954bd2b6461e69d866b37694810c918 (patch)
treeace6875462f2ba9aba6d23d5cc292ea1df4749bc
parent8d56788cd41638bc25dda3b2be03c154f3df7fec (diff)
downloadRustAndDust-7983c8ba5954bd2b6461e69d866b37694810c918.zip
RustAndDust-7983c8ba5954bd2b6461e69d866b37694810c918.tar.gz
GameConfig: add and use canCancel, mustValidate
-rw-r--r--TODO5
-rw-r--r--core/src/ch/asynk/tankontank/game/GameCtrl.java4
-rw-r--r--core/src/ch/asynk/tankontank/game/states/GameStateMove.java2
-rw-r--r--core/src/ch/asynk/tankontank/game/states/GameStateRotate.java2
4 files changed, 6 insertions, 7 deletions
diff --git a/TODO b/TODO
index c568a85..b524f40 100644
--- a/TODO
+++ b/TODO
@@ -22,8 +22,3 @@ Game:
- attack
- assists
- promote
-
-
-Config:
- - can reset actions
- - must validate actions
diff --git a/core/src/ch/asynk/tankontank/game/GameCtrl.java b/core/src/ch/asynk/tankontank/game/GameCtrl.java
index 7951f80..76f79ab 100644
--- a/core/src/ch/asynk/tankontank/game/GameCtrl.java
+++ b/core/src/ch/asynk/tankontank/game/GameCtrl.java
@@ -18,12 +18,16 @@ public class GameCtrl implements Disposable
public boolean showMoves;
public boolean showTargets;
public boolean showMoveAssists;
+ public boolean canCancel;
+ public boolean mustValidate;
public Config()
{
this.showMoves = true;
this.showTargets = true;
this.showMoveAssists = true;
+ this.mustValidate = false;
+ this.canCancel = true;
}
}
diff --git a/core/src/ch/asynk/tankontank/game/states/GameStateMove.java b/core/src/ch/asynk/tankontank/game/states/GameStateMove.java
index 110e3c6..1331adc 100644
--- a/core/src/ch/asynk/tankontank/game/states/GameStateMove.java
+++ b/core/src/ch/asynk/tankontank/game/states/GameStateMove.java
@@ -7,7 +7,7 @@ public class GameStateMove extends GameStateCommon
{
map.clearPossiblePaths();
buildAndShowMoves();
- ctrl.hud.show(false, true, false, true, true);
+ ctrl.hud.show(false, true, false, ctrl.cfg.mustValidate, ctrl.cfg.canCancel);
}
@Override
diff --git a/core/src/ch/asynk/tankontank/game/states/GameStateRotate.java b/core/src/ch/asynk/tankontank/game/states/GameStateRotate.java
index 7a200d2..75167ad 100644
--- a/core/src/ch/asynk/tankontank/game/states/GameStateRotate.java
+++ b/core/src/ch/asynk/tankontank/game/states/GameStateRotate.java
@@ -8,7 +8,7 @@ public class GameStateRotate extends GameStateCommon
public void enter()
{
map.showDirections(hex, true);
- ctrl.hud.show(true, false, false, true, true);
+ ctrl.hud.show(true, false, false, ctrl.cfg.mustValidate, ctrl.cfg.canCancel);
}
@Override