diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2015-12-08 10:54:45 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2015-12-08 10:54:45 +0100 |
commit | e205be0b8215515d0dd2bb88c94ab69f3078be53 (patch) | |
tree | 1f9a14fcf44007c74cdab1de03f26f8af3459fe2 /core/src/ch/asynk/rustanddust/game/battles | |
parent | e13782b015b1960d1e1102ca4ded92d9d64096c9 (diff) | |
download | RustAndDust-e205be0b8215515d0dd2bb88c94ab69f3078be53.zip RustAndDust-e205be0b8215515d0dd2bb88c94ab69f3078be53.tar.gz |
Map,MapRules: move init(), turnDone(), actionDone() from the former to the second
Diffstat (limited to 'core/src/ch/asynk/rustanddust/game/battles')
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/battles/MapRules.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/battles/MapRules.java b/core/src/ch/asynk/rustanddust/game/battles/MapRules.java index 3426701..89af8bd 100644 --- a/core/src/ch/asynk/rustanddust/game/battles/MapRules.java +++ b/core/src/ch/asynk/rustanddust/game/battles/MapRules.java @@ -14,6 +14,30 @@ abstract public class MapRules extends Map } @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) { if ((activatedUnits.size() == 1) && e.attacker.isA(Unit.UnitType.AT_GUN) && e.defender.isHardTarget()) |