public void ReturnNoWinner(List <List <Symbol> > currentBoard) { Symbol playerSymbol = Symbol.Naught; GameStatus game = new GameStatus(currentBoard, playerSymbol); var actualResult = game.HasWinner(); Assert.IsFalse(actualResult); }
public void ReturnAWinnerForCross(List <List <Symbol> > currentBoard) { Symbol playerSymbol = Symbol.Cross; GameStatus game = new GameStatus(currentBoard, playerSymbol); var actualResult = game.HasWinner(); Assert.IsTrue(actualResult); }
private void CheckGameStatus(Player currentPlayer) { GameStatus = new GameStatus(Board.CurrentGameBoard, currentPlayer.PlayerSymbol); _gameOver = GameStatus.HasWinner(); if (_gameOver) { DisplayGameResult(); } }
private void DisplayGameResult() { if (!GameStatus.HasWinner()) { if (GameStatus.IsADrawGame()) { Console.WriteLine("It's a draw game."); } } else { Console.WriteLine("Move accepted, well done you've won the game!"); } Console.WriteLine(Board.DisplayCurrentBoard()); Console.ReadLine(); Environment.Exit(0); }