diff --git a/src/TicTacToe.h b/src/TicTacToe.h index d7a57e0..fe0ba58 100644 --- a/src/TicTacToe.h +++ b/src/TicTacToe.h @@ -2,5 +2,6 @@ #define TICTACTOE_H int switchPlayer(int currentPlayer); +int checkForWin(int pos1, int pos2, int pos3, int pos4, int pos5, int pos6, int pos7, int pos8, int pos9, int currentPlayer); #endif // TICTACTOE_H \ No newline at end of file diff --git a/test/test_tictactoe.c b/test/test_tictactoe.c index 17dc2a5..bbee7bf 100644 --- a/test/test_tictactoe.c +++ b/test/test_tictactoe.c @@ -16,4 +16,10 @@ void test_switchPlayer_10_to_11(void) { TEST_ASSERT(switchPlayer(10) == 11); } +// Testfall für die Funktion checkForWin - Horizontaler Sieg +void test_CheckForWin_Horizontal_1_2_3(void) { + // Teste horizontalen Sieg in der ersten Zeile + TEST_ASSERT(checkForWin(10, 10, 10, 4, 5, 6, 7, 8, 9, 10) == 1); +} + #endif // TEST \ No newline at end of file