summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk/tankontank')
-rw-r--r--core/src/ch/asynk/tankontank/game/Map.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Map.java b/core/src/ch/asynk/tankontank/game/Map.java
index aa14ea4..20076b1 100644
--- a/core/src/ch/asynk/tankontank/game/Map.java
+++ b/core/src/ch/asynk/tankontank/game/Map.java
@@ -16,6 +16,7 @@ import ch.asynk.tankontank.engine.Faction;
import ch.asynk.tankontank.engine.Move;
import ch.asynk.tankontank.engine.SelectedTile;
import ch.asynk.tankontank.engine.ObjectiveSet;
+import ch.asynk.tankontank.engine.OrderList;
import ch.asynk.tankontank.engine.Orientation;
import ch.asynk.tankontank.engine.Meteorology;
import ch.asynk.tankontank.engine.PathBuilder;
@@ -60,6 +61,8 @@ public abstract class Map extends Board implements MoveToAnimationCb, ObjectiveS
private Animation animationClosure;
private Engagement engagement;
+ private OrderList orderList;
+
protected abstract void setup();
public int d6()
@@ -104,6 +107,7 @@ public abstract class Map extends Board implements MoveToAnimationCb, ObjectiveS
objectives = new ObjectiveSet(this, 4);
meteorology = new Meteorology();
+ orderList = new OrderList();
}
@Override
@@ -322,6 +326,10 @@ public abstract class Map extends Board implements MoveToAnimationCb, ObjectiveS
break;
}
+ if (r != -1) {
+ orderList.add(cmd);
+ }
+
return r;
}
@@ -334,10 +342,15 @@ public abstract class Map extends Board implements MoveToAnimationCb, ObjectiveS
public void turnDone()
{
+ TankOnTank.debug("TurnDone", String.format(" Processed Commands : %d", orderList.size()));
+
if (engagement != null)
throw new RuntimeException("engagement not cleared");
if (objectives.modifiedCount() > 0)
throw new RuntimeException("objectives not cleared");
+
+ // FIXME do something with these Commands
+ orderList.clear();
}
public void actionDone()