コード例 #1
0
        public GameActionResult MakeShot(string coordinates)
        {
            if (_currentOutcome == GameActionOutcome.Win)
            {
                return(ErrorResult("Game already won"));
            }

            var result = GetShotResult(coordinates);

            _currentOutcome = result.Outcome;

            return(result);
        }
コード例 #2
0
 public void GenerateNewGame()
 {
     _interactionHandler = _gameStateFactoryMethod();
     _boardViewUpdater.ResetGame();
     _currentOutcome = GameActionOutcome.Error;
 }