Browse Source

Test checkWinner

remotes/origin/Ariana
fdai7775 11 months ago
parent
commit
6effaec97b
  1. 1
      src/main/c/GameTic_Tac_Toe/tictactoe.h
  2. 4
      test/test_tictactoe.c

1
src/main/c/GameTic_Tac_Toe/tictactoe.h

@ -8,5 +8,6 @@ char checkLine(char a, char b, char c);
void start_tictactoe();
char checkWinner();
void makeMove(int choice);
void displayBoard();
#endif

4
test/test_tictactoe.c

@ -52,11 +52,13 @@ void test_checkWinner_vertikalerGewinner(void) {
char result;
// Setze die Daten für einen vertikalen Gewinner
displayBoard();
makeMove(1);
makeMove(2);
makeMove(4);
makeMove(3);
makeMove(7);
displayBoard();
/* handeln */
result = checkWinner();
@ -69,11 +71,13 @@ void test_checkWinner_horizontalerGewinner(void) {
/* arrangieren */
char result;
displayBoard();
makeMove(1);
makeMove(4);
makeMove(2);
makeMove(5);
makeMove(3);
displayBoard();
/* handeln */
result = checkWinner();

Loading…
Cancel
Save