Esempio n. 1
0
        public GameSettings(GameBoard gameBoard, GameMetadata metadata = null)
        {
            if (null == gameBoard)
            {
                throw new ArgumentNullException(nameof(gameBoard));
            }

            GameRecording     = new GameRecording(gameBoard, GameRecordingSource.Game, metadata);
            _currentGameBoard = GameRecording.GameBoard.Clone();
        }
Esempio n. 2
0
        public void LoadGame(GameRecording gameRecording)
        {
            if (null == gameRecording)
            {
                throw new ArgumentNullException(nameof(gameRecording));
            }

            CurrentGameSettings = new GameSettings(gameRecording)
            {
                WhitePlayerType = PlayerType.Human,
                BlackPlayerType = PlayerType.Human,
                GameMode        = GameMode.Review,
            };

            SendCommand("newgame {0}", () => { OnGameModeChanged(); }, ReviewBoard.ToGameString());
        }
Esempio n. 3
0
 public GameSettings(GameRecording gameRecording)
 {
     GameRecording     = gameRecording ?? throw new ArgumentNullException(nameof(gameRecording));
     _currentGameBoard = GameRecording.GameBoard.Clone();
 }
Esempio n. 4
0
 public GameSettings()
 {
     GameRecording     = new GameRecording(new GameBoard(), GameRecordingSource.Game);
     _currentGameBoard = GameRecording.GameBoard.Clone();
 }