/// <summary> /// Обрабатывает событие завершения ввода игроков /// </summary> /// <param name="parSender">Источник события</param> /// <param name="parE">Параметры события</param> private void OnCompleteEnterOfPlayers(object parSender, CompleteEnterOfPlayersArgs parE) { _platform.UnsubscribeAllEvents(); _gameFieldController = new GameFieldController(parE.Players, _platform); _currentControllerInGameState = _gameFieldController; _currentControllerInGameState.ChangeState += OnChangeState; _enterOfPlayersController = null; }
/// <summary> /// Конструктор /// </summary> /// <param name="parPlatform">Платформа</param> public GameController(Platform parPlatform) { _enterOfPlayersController = new EnterOfPlayersController(parPlatform); _currentControllerInGameState = _enterOfPlayersController; _enterOfPlayersController.CompleteEnterOfPlayers += OnCompleteEnterOfPlayers; _platform = parPlatform; _currentControllerInGameState.ChangeState += OnChangeState; }