Esempio n. 1
0
        public Board CalculateHints(BoardHints hints, char player)
        {
            switch (hints)
            {
            case BoardHints.Hints:
                return(HintPlayer(GameBoard, player));

            case BoardHints.NumericHints:
                return(AiWithScoreTable.GetNumericHints(GameBoard, player));

            default:
                var hintBoard = new Board(GameBoard);
                hintBoard.ClearBoard(' ');
                return(hintBoard);
            }
        }
Esempio n. 2
0
        public void ConfigHandler_ReadCommandLine_CorrectParametersAreReturned(string[] commandLine, Player expectedAiConfig, BoardHints expectedHintConfig, char expectedPlayerConfig)
        {
            var expectedConfig = new Config
            {
                Ai          = expectedAiConfig,
                Hints       = expectedHintConfig,
                StartPlayer = expectedPlayerConfig,
                BoardWidth  = 8,
                BoardHeight = 8,
                SaveGame    = null,
            };

            var actualConfig = ConfigHandler.ReadCommandLineArgumants(commandLine);

            Assert.AreEqual(expectedConfig, actualConfig);
        }