Beispiel #1
0
        private GameController(
            Field field,
            PlayerTurnSignal playerTurnSignal,
            EnemyTurnSignal enemyTurnSignal,
            WaitForPlayerTurnSignal waitForPlayerTurnSignal,
            WaitForEnemyTurnSignal waitForEnemyTurnSignal,
            AttackTurnAction.Factory attackPerformerFactory,
            SceneLauncher sceneLauncher,
            IVictoryCondition victoryCondition,
            ILossCondtion lossCondtion)
        {
            this.field                   = field;
            this.playerTurnSignal        = playerTurnSignal;
            this.enemyTurnSignal         = enemyTurnSignal;
            this.waitForPlayerTurnSignal = waitForPlayerTurnSignal;
            this.waitForEnemyTurnSignal  = waitForEnemyTurnSignal;
            this.attackPerformerFactory  = attackPerformerFactory;
            this.sceneLauncher           = sceneLauncher;
            this.victoryCondition        = victoryCondition;
            this.lossCondtion            = lossCondtion;

            this.turnQueue = new Queue <Character> ();

            turnQueue.Enqueue(field.Player);
            foreach (var enemy in field.Enemies)
            {
                turnQueue.Enqueue(enemy);
            }
        }
Beispiel #2
0
 private EnemyController(
     Field field,
     WaitForEnemyTurnSignal waitForEnemyTurnSignal,
     EnemyTurnSignal enemyTurnSignal,
     AttackTurnAction.Factory attackTurnActionFactory,
     MoveTurnAction.PositionFactory moveTurnActionFactory,
     IAttackPossibility attackPossibility,
     IEnemyMovePositionPicker enemyMovePositionPicker)
 {
     this.field = field;
     this.waitForEnemyTurnSignal  = waitForEnemyTurnSignal;
     this.enemyTurnSignal         = enemyTurnSignal;
     this.attackTurnActionFactory = attackTurnActionFactory;
     this.moveTurnActionFactory   = moveTurnActionFactory;
     this.attackPossibility       = attackPossibility;
     this.enemyMovePositionPicker = enemyMovePositionPicker;
 }