summaryrefslogtreecommitdiffstats
path: root/core/src/ch
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch')
-rw-r--r--core/src/ch/asynk/rustanddust/game/Ctrl.java5
-rw-r--r--core/src/ch/asynk/rustanddust/game/Map.java4
-rw-r--r--core/src/ch/asynk/rustanddust/game/ctrl/Solo.java10
-rw-r--r--core/src/ch/asynk/rustanddust/game/map/Map4Orders.java4
4 files changed, 16 insertions, 7 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Ctrl.java b/core/src/ch/asynk/rustanddust/game/Ctrl.java
index 284d20d..871dba6 100644
--- a/core/src/ch/asynk/rustanddust/game/Ctrl.java
+++ b/core/src/ch/asynk/rustanddust/game/Ctrl.java
@@ -47,8 +47,9 @@ public abstract class Ctrl implements Disposable
private StateType stateAfterAnimation;
public abstract void init();
- protected abstract void processAction();
- protected abstract void processTurn();
+ protected abstract void actionDoneCb();
+ protected abstract void turnDoneCb();
+ public abstract void orderProcessedCb();
public static Ctrl getCtrl(final RustAndDust game)
{
diff --git a/core/src/ch/asynk/rustanddust/game/Map.java b/core/src/ch/asynk/rustanddust/game/Map.java
index 27661f2..9695b92 100644
--- a/core/src/ch/asynk/rustanddust/game/Map.java
+++ b/core/src/ch/asynk/rustanddust/game/Map.java
@@ -32,13 +32,13 @@ public abstract class Map extends Map5Marshal
public void actionDone()
{
- game.ctrl.processAction();
+ game.ctrl.actionDoneCb();
}
public void turnDone()
{
RustAndDust.debug("TurnDone", String.format(" Processed Orders : %d", ordersSize()));
- game.ctrl.processTurn();
+ game.ctrl.turnDoneCb();
ordersClear();
}
diff --git a/core/src/ch/asynk/rustanddust/game/ctrl/Solo.java b/core/src/ch/asynk/rustanddust/game/ctrl/Solo.java
index 32e237f..6fe871f 100644
--- a/core/src/ch/asynk/rustanddust/game/ctrl/Solo.java
+++ b/core/src/ch/asynk/rustanddust/game/ctrl/Solo.java
@@ -33,13 +33,19 @@ public class Solo extends Ctrl
}
@Override
- protected void processAction()
+ public void orderProcessedCb()
+ {
+ // TODO
+ }
+
+ @Override
+ protected void actionDoneCb()
{
storeGame();
}
@Override
- protected void processTurn()
+ protected void turnDoneCb()
{
storeGame();
storeTurn();
diff --git a/core/src/ch/asynk/rustanddust/game/map/Map4Orders.java b/core/src/ch/asynk/rustanddust/game/map/Map4Orders.java
index 8cbaf89..e8ad751 100644
--- a/core/src/ch/asynk/rustanddust/game/map/Map4Orders.java
+++ b/core/src/ch/asynk/rustanddust/game/map/Map4Orders.java
@@ -160,8 +160,10 @@ public abstract class Map4Orders extends Map3Animations
break;
}
- if (r != -1)
+ if (r != -1) {
orders.add(cmd);
+ game.ctrl.orderProcessedCb();
+ }
return r;
}