|
@ -160,6 +160,20 @@ void test_getNumberOfMoves_returns_correct_number_of_moves(void) { |
|
|
TEST_ASSERT_EQUAL(2, moves); |
|
|
TEST_ASSERT_EQUAL(2, moves); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void test_BoardFull_returns_false_when_board_is_not_full(void) { |
|
|
|
|
|
// Arrange |
|
|
|
|
|
TicTacToeGame game = { .board = {{PLAYER_X, EMPTY, EMPTY}, |
|
|
|
|
|
{EMPTY, PLAYER_O, EMPTY}, |
|
|
|
|
|
{EMPTY, EMPTY, EMPTY}}, |
|
|
|
|
|
.currentPlayer = PLAYER_X }; |
|
|
|
|
|
|
|
|
|
|
|
// Act |
|
|
|
|
|
int boardFull = BoardFull(&game); |
|
|
|
|
|
|
|
|
|
|
|
// Assert |
|
|
|
|
|
TEST_ASSERT_FALSE(boardFull); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|