public void UpdateBoard_WithDefaultBoradAndUpArrow_ReturnsZeroScoreAndGameNotUpdated() { // Arrange var gameAlgorithm = new GameAlgorithm(); var board = new ulong[4, 4]; // Act ulong score; bool isGameUpdated = gameAlgorithm.UpdateBoard(board, Direction.Up, out score); // Assert isGameUpdated.Should().BeFalse(); score.Should().Be(0); }
public void UpdateBoard_WithGameBoardUpdate_ReturnsGameChanged() { // Arrange var gameAlgorithm = new GameAlgorithm(); var board = new ulong[4, 4]; board[3, 1] = 2; // Act ulong score; bool isGameUpdated = gameAlgorithm.UpdateBoard(board, Direction.Up, out score); // Assert isGameUpdated.Should().BeTrue(); }
public void UpdateBoard_WithBoardFilled_ReturnsScore() { // Arrange var gameAlgorithm = new GameAlgorithm(); var board = new ulong[4, 4]; board[2, 0] = 2; board[3, 0] = 4; // Act ulong score; bool isGameUpdated = gameAlgorithm.UpdateBoard(board, Direction.Down, out score); // Assert // score.Should().Be(4); }