예제 #1
0
        public void PlayShould_DeterminePlayer2IsWinner_WhenPlayer2InputLocationOnTheSameRow()
        {
            IInputOutput iio     = new TestResponder(new[] { "3,1", "2,2", "1,3", "2,3", "1,2", "2,1" });
            Game         newGame = new Game(iio, _rule, _player1, _player2);

            newGame.Play();
            Assert.True(_player2.IsWinner);
        }
예제 #2
0
        public void PlayShould_ChangeGameStateToQuit_WhenUserInputListEndWithQ()
        {
            IInputOutput iio     = new TestResponder(new[] { "1,1", "1,2", "1,3", QuitResponse });
            Game         newGame = new Game(iio, _rule, _player1, _player2);

            newGame.Play();
            Assert.Equal(GameState.Quit, newGame.GameState);
        }