Пример #1
0
        private void StartRound(GameRoundModel roundModel)
        {
            _currentGameRoundModel = roundModel;

            ResetRound();
            ApplyPlayerModelsToController(roundModel);
            _gameRoundUIController.DrawPlayersPanels();
        }
Пример #2
0
 private void ApplyPlayerModelsToController(GameRoundModel roundModel)
 {
     foreach (PlayerType playerType in _playerControllers.Keys)
     {
         PlayerModel model = roundModel.GetPlayerByType(playerType);
         model.Start();
         GetPlayerController(playerType).PlayerModel = model;
     }
 }
Пример #3
0
        public static GameRoundModel Create(GameType gameType, Data gameSettings)
        {
            bool withBuffs = gameType == GameType.WITH_BUFFS;

            GameRoundModel result = new GameRoundModel();

            for (int i = 0; i < gameSettings.settings.playersCount; i++)
            {
                PlayerType  playerType = GetPlayerTypeByIndex(i);
                PlayerModel player     = CreatePlayerModel(gameSettings, playerType, withBuffs);
                result.AddPlayer(playerType, player);
            }
            return(result);
        }
Пример #4
0
        public void CreateRound(GameType gameType)
        {
            GameRoundModel gameRoundModel = GameRoundFactory.Create(gameType, _dataConfig);

            StartRound(gameRoundModel);
        }