Refactoring the timing of actions.

This commit is contained in:
marcins78@gmail.com
2011-11-26 20:28:16 +00:00
parent c988d598ec
commit a1432c71c4

View File

@@ -68,13 +68,17 @@ public class TurnProcedure {
} else { } else {
Effect effect = _actionStack.getNextEffect(_game); Effect effect = _actionStack.getNextEffect(_game);
if (effect != null) { if (effect != null) {
if (effect instanceof RulesEffect) if (effect.getType() == null)
effect.playEffect(_game); effect.playEffect(_game);
else else
_actionStack.stackAction(new PlayOutEffect(effect)); _actionStack.stackAction(new PlayOutEffect(effect));
} }
} }
} }
if (_gameStats.updateGameStats(_game))
_game.getGameState().sendGameStats(_gameStats);
_game.checkRingBearerCorruption(); _game.checkRingBearerCorruption();
} }
} }
@@ -113,11 +117,7 @@ public class TurnProcedure {
} }
if (!_effectPlayed) { if (!_effectPlayed) {
_effectPlayed = true; _effectPlayed = true;
_effect.playEffect(_game); _effect.playEffect(_game);
if (_gameStats.updateGameStats(_game))
_game.getGameState().sendGameStats(_gameStats);
} }
return null; return null;