public void BottomHorizontalWinning() { var game = new TicTakToeGame(); game.PlayX(RowColumn.BottomLeft); game.PlayY(RowColumn.CenterLeft); game.PlayX(RowColumn.BottomMiddle); game.PlayY(RowColumn.CenterRight); game.PlayX(RowColumn.BottomRight); var gameStatus = game.GetStatus(); gameStatus.Should().Be(GameStatus.XWins); }
public void ConsiderHorizontalWinningX() { var game = new TicTakToeGame(); game.PlayX(RowColumn.TopLeft); game.PlayY(RowColumn.BottomLeft); game.PlayX(RowColumn.TopMiddle); game.PlayY(RowColumn.BottomRight); game.PlayX(RowColumn.TopRight); var gameStatus = game.GetStatus(); gameStatus.Should().Be(GameStatus.XWins); }
public void ConsiderAnotherDiagonalWinningX() { var game = new TicTakToeGame(); game.PlayX(RowColumn.TopRight); game.PlayY(RowColumn.CenterLeft); game.PlayX(RowColumn.CenterMiddle); game.PlayY(RowColumn.BottomMiddle); game.PlayX(RowColumn.BottomLeft); var gameStatus = game.GetStatus(); gameStatus.Should().Be(GameStatus.XWins); }
public void ConsiderVerticalWinningY() { var game = new TicTakToeGame(); game.PlayX(RowColumn.BottomRight); game.PlayY(RowColumn.TopLeft); game.PlayX(RowColumn.CenterMiddle); game.PlayY(RowColumn.CenterLeft); game.PlayX(RowColumn.CenterRight); game.PlayY(RowColumn.BottomLeft); var gameStatus = game.GetStatus(); gameStatus.Should().Be(GameStatus.YWins); }
public void BecomeADrawWhenAllPositionsFilled() { var game = new TicTakToeGame(); game.PlayX(RowColumn.TopLeft); game.PlayY(RowColumn.TopMiddle); game.PlayX(RowColumn.TopRight); game.PlayY(RowColumn.CenterMiddle); game.PlayX(RowColumn.BottomMiddle); game.PlayY(RowColumn.CenterLeft); game.PlayX(RowColumn.BottomLeft); game.PlayY(RowColumn.BottomRight); game.PlayX(RowColumn.CenterRight); var gameStatus = game.GetStatus(); gameStatus.Should().Be(GameStatus.Draw); }
public void NotBeTheSameAsOtherGame_GivenOtherGameHasBeenPlayedOneMoreTime() { var game = new TicTakToeGame(); var otherGame = new TicTakToeGame(); game.PlayX(RowColumn.TopLeft); otherGame.PlayX(RowColumn.TopLeft); otherGame.PlayY(RowColumn.TopRight); game.Should().NotBe(otherGame); }