|
@ -119,4 +119,19 @@ void test_checkWin_Vertical_O(void) { |
|
|
|
|
|
|
|
|
TEST_ASSERT_EQUAL_INT(1, checkWin(board, 'O')); // Vertikale Gewinnsituation für 'X' |
|
|
TEST_ASSERT_EQUAL_INT(1, checkWin(board, 'O')); // Vertikale Gewinnsituation für 'X' |
|
|
} |
|
|
} |
|
|
|
|
|
void test_checkWin_NoWinner(void) { |
|
|
|
|
|
char board[6][7] = { |
|
|
|
|
|
{'X', 'O', 'X', 'O', 'X', 'O', 'X'}, |
|
|
|
|
|
{'O', 'X', 'O', 'X', 'O', 'X', 'O'}, |
|
|
|
|
|
{'O', 'X', 'O', 'X', 'O', 'X', 'O'}, |
|
|
|
|
|
{'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(0, checkWin(board, 'X')); // Kein Gewinner, horizontale Reihe ist voll |
|
|
|
|
|
TEST_ASSERT_EQUAL_INT(0, checkWin(board, 'O')); // Kein Gewinner, horizontale Reihe ist voll |
|
|
|
|
|
} |