From e205be0b8215515d0dd2bb88c94ab69f3078be53 Mon Sep 17 00:00:00 2001 From: Jérémy Zurcher Date: Tue, 8 Dec 2015 10:54:45 +0100 Subject: Map,MapRules: move init(), turnDone(), actionDone() from the former to the second --- .../asynk/rustanddust/game/battles/MapRules.java | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'core/src/ch/asynk/rustanddust/game/battles') diff --git a/core/src/ch/asynk/rustanddust/game/battles/MapRules.java b/core/src/ch/asynk/rustanddust/game/battles/MapRules.java index 34267013..89af8bd0 100644 --- a/core/src/ch/asynk/rustanddust/game/battles/MapRules.java +++ b/core/src/ch/asynk/rustanddust/game/battles/MapRules.java @@ -13,6 +13,30 @@ abstract public class MapRules extends Map super(game, map, hex); } + @Override + public void init() + { + actionDone(); + } + + @Override + public void turnDone() + { + RustAndDust.debug("TurnDone", String.format(" Processed Commands : %d", commandsSize())); + + if (objectives.modifiedCount() > 0) + throw new RuntimeException("objectives not cleared"); + + // FIXME do something with these Commands + commandsClear(); + } + + @Override + public void actionDone() + { + objectives.forget(); + } + @Override protected int engagementCost(Engagement e) { -- cgit v1.2.3