|
@ -135,3 +135,17 @@ char board[6][7] = { |
|
|
TEST_ASSERT_EQUAL_INT(0, checkWin(board, 'X')); // Kein Gewinner, horizontale Reihe ist voll |
|
|
TEST_ASSERT_EQUAL_INT(0, checkWin(board, 'X')); // Kein Gewinner, horizontale Reihe ist voll |
|
|
TEST_ASSERT_EQUAL_INT(0, checkWin(board, 'O')); // Kein Gewinner, horizontale Reihe ist voll |
|
|
TEST_ASSERT_EQUAL_INT(0, checkWin(board, 'O')); // Kein Gewinner, horizontale Reihe ist voll |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void test_isColumnFull(void) { |
|
|
|
|
|
char board[6][7] = { |
|
|
|
|
|
{'X', 'O', 'X', 'O', 'X', 'O', 'X'}, |
|
|
|
|
|
{'O', 'X', 'O', 'X', 'O', 'X', 'O'}, |
|
|
|
|
|
{'X', 'O', 'X', 'O', 'X', 'O', 'X'}, |
|
|
|
|
|
{'O', 'X', 'O', 'X', 'O', 'X', 'O'}, |
|
|
|
|
|
{'X', 'O', 'X', 'O', 'X', 'O', 'X'}, |
|
|
|
|
|
{'O', 'X', 'O', 'X', 'O', 'X', 'O'} |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
TEST_ASSERT_EQUAL_INT(1, isColumnFull(board, 3)); // Column 3 is full |
|
|
|
|
|
} |
|
|
|
|
|
|