예제 #1
0
        public void TestNextMoveGameFinished()
        {
            GenericGameState state = new GenericGameState();
            ComputerPlayer player1 = new ComputerPlayer("Jim", SpaceState.X);
            ComputerPlayer player2 = new ComputerPlayer("Denise", SpaceState.X);

            Game3x3 game = new Game3x3(state, null, player1, player2);
            finishGame(game);

            Assert.IsNull(player1.NextMove(game), "Should return null as there are no spaces");
        }
예제 #2
0
        public void TestGetNextMove()
        {
            GenericGameState state = new GenericGameState();
            ComputerPlayer player1 = new ComputerPlayer("Jim", SpaceState.X);
            ComputerPlayer player2 = new ComputerPlayer("Denise", SpaceState.X);

            Game3x3 game = new Game3x3(state, null, player1, player2);
            Space s = player1.NextMove(game);

            Assert.IsNotNull(s, "Should have returned an actual space");
        }