Beispiel #1
0
        public Battle()
        {
            _field = new Battlefield();
            _field.Status = Battlefield.BattleStatus.Active;

            _commandManager = new CommandManager(_field);
            _commandManager.CommandEvent += HandleCommand;

            _availableStrategies = new List<MilitaryStrategy>(3);
            LoadAvailableStrategies();
            if (_availableStrategies.Count == 0)
                throw new Exception("No available strategies.");

            _currentStrategy = _availableStrategies[0];

            _interrupt = new BattleInterruptController(_field, 10);
        }
 public WallOnWallStrategy(CommandManager commandManager, Battlefield field)
     : base(commandManager, field)
 {
 }
 protected MilitaryStrategy(CommandManager commandManager, Battlefield field)
 {
     _commandManager = commandManager;
     _field = field;
 }
 public OneOnOneStrategy(CommandManager commandManager, Battlefield field)
     : base(commandManager, field)
 {
 }