public void MessageIfPlayersDraw()
        {
            var game = new GameBuilder().PlayersDraw().Build();

            game.Play();

            var printer = new GameBoardPrinter(game);
            Assert.That(printer.WinnerMessage(), Is.EqualTo("No winner, players have drawn."));
        }
        public void MessageIfPlayerHasWon()
        {
            var game = new GameBuilder().NaughtsWins().Build();

            game.Play();

            var printer = new GameBoardPrinter(game);
            Assert.That(printer.WinnerMessage(), Is.EqualTo("The winner is Naughts."));
        }
        public void PrintGameBoard()
        {
            var game = new GameBuilder().NaughtsWins().Build();
            var printer = new GameBoardPrinter(game);

            game.Play();

            // I think this might be a bit over-specified..
            Assert.That(printer.Board(), Is.EqualTo(" | O | O | O | " + Environment.NewLine +
                                                    " | X | X |   | " + Environment.NewLine +
                                                    " |   |   |   | " + Environment.NewLine));
        }
 public void WhenGameIsOverStopPlaying()
 {
     var game = new GameBuilder().NaughtsWins().Build();
     game.Play();
     Assert.Throws<GameOverException>(() => game.PlayTurn());
 }