Exemple #1
0
        /// <summary>
        /// Starts new game with the given state.
        /// </summary>
        /// <param name="state">The state of the game.</param>
        public virtual void StartGame(GameState state)
        {
            GameBoard  = _builder.BuildBoard(state);
            GameEngine = _builder.BuildGameEngine(state, GameBoard, _provider);
            Player player = GameBoard.Elements.OfType <Player>().Single();

            player.Dead += (x, e) => OnGameEnded();
        }