Example #1
0
    public void TakeTurn()
    {
        ++turnCount;

        if (sim.currentTurn == Turn.Type.Player) {
          var playerProcessor = new PlayerProcessor(sim);
          playerProcessor.TakeTurn();
        } else if (sim.currentTurn == Turn.Type.Game) {
          var gameProcessor = new GameProcessor(sim);
          gameProcessor.TakeTurn();
        }

        bool atTurnLimit = (turnCount >= maxTurnCount);

        if (sim.requiresInput || atTurnLimit) {
          NotificationCenter.PostNotification(Constants.OnRenderEvents);
          return;
        } else {
          TakeTurn();
        }
    }
 public PlayersController(PlayerProcessor processor)
 {
     _processor = processor;
 }
Example #3
0
 internal ConstructableItem(Constructable constructable, PlayerProcessor playerProcessor) :
     this(constructable, playerProcessor, null, 0)
 {
 }