コード例 #1
0
        public void When_BotMakesTwoMoves_Then_BoardShouldHas7MovesLeft()
        {
            Board board = new Board();
            BotRandomMovesForDefaultBoard botRandom = new BotRandomMovesForDefaultBoard(board, 'X');
            GameController gameController           = new GameController(board, botRandom, botRandom);

            botRandom.MakeMove();
            botRandom.MakeMove();

            Assert.AreEqual(7, gameController.HowManyMovesLeft());
        }
コード例 #2
0
        public void When_TwoBotsMake9Moves_Then_BoardShouldHas0MovesLeft()
        {
            Board board = new Board();
            BotRandomMovesForDefaultBoard botRandom1 = new BotRandomMovesForDefaultBoard(board, 'X');
            BotRandomMovesForDefaultBoard botRandom2 = new BotRandomMovesForDefaultBoard(board, '0');
            GameController gameController            = new GameController(board, botRandom1, botRandom2);

            botRandom1.MakeMove();
            botRandom2.MakeMove();

            Assert.AreEqual(7, gameController.HowManyMovesLeft());
        }