|
@ -52,14 +52,12 @@ void test_checkWinner_vertikalerGewinner(void) { |
|
|
/* arrangieren */ |
|
|
/* arrangieren */ |
|
|
char result; |
|
|
char result; |
|
|
|
|
|
|
|
|
// Setze die Daten für einen vertikalen Gewinner |
|
|
|
|
|
displayBoard(); |
|
|
|
|
|
|
|
|
// Setze die Daten für einen vertikalen Gewinne |
|
|
makeMove(1); |
|
|
makeMove(1); |
|
|
makeMove(2); |
|
|
makeMove(2); |
|
|
makeMove(4); |
|
|
makeMove(4); |
|
|
makeMove(3); |
|
|
makeMove(3); |
|
|
makeMove(7); |
|
|
makeMove(7); |
|
|
displayBoard(); |
|
|
|
|
|
|
|
|
|
|
|
/* handeln */ |
|
|
/* handeln */ |
|
|
result = checkWinner(); |
|
|
result = checkWinner(); |
|
@ -73,20 +71,18 @@ void test_checkWinner_horizontalerGewinner(void) { |
|
|
/* arrangieren */ |
|
|
/* arrangieren */ |
|
|
char result; |
|
|
char result; |
|
|
|
|
|
|
|
|
displayBoard(); |
|
|
|
|
|
//makeMove(1); |
|
|
|
|
|
//makeMove(4); |
|
|
|
|
|
//makeMove(2); |
|
|
|
|
|
//makeMove(5); |
|
|
|
|
|
//makeMove(3); |
|
|
|
|
|
displayBoard(); |
|
|
|
|
|
|
|
|
makeMove(1); |
|
|
|
|
|
makeMove(4); |
|
|
|
|
|
makeMove(2); |
|
|
|
|
|
makeMove(5); |
|
|
|
|
|
makeMove(3); |
|
|
|
|
|
|
|
|
/* handeln */ |
|
|
/* handeln */ |
|
|
result = checkWinner(); |
|
|
result = checkWinner(); |
|
|
|
|
|
|
|
|
/* überprüfen */ |
|
|
/* überprüfen */ |
|
|
TEST_ASSERT_EQUAL_CHAR('X', result); |
|
|
TEST_ASSERT_EQUAL_CHAR('X', result); |
|
|
reset_board() |
|
|
|
|
|
|
|
|
reset_board(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
#endif // TEST |
|
|
#endif // TEST |