From 6effaec97b6fbe3ff8cd60976eb536b6e34f3987 Mon Sep 17 00:00:00 2001 From: fdai7775 Date: Fri, 2 Feb 2024 12:53:23 +0000 Subject: [PATCH] Test checkWinner --- src/main/c/GameTic_Tac_Toe/tictactoe.h | 1 + test/test_tictactoe.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/main/c/GameTic_Tac_Toe/tictactoe.h b/src/main/c/GameTic_Tac_Toe/tictactoe.h index 93c7d14..89d5ab9 100644 --- a/src/main/c/GameTic_Tac_Toe/tictactoe.h +++ b/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 diff --git a/test/test_tictactoe.c b/test/test_tictactoe.c index 5ece3e4..7dafd2e 100644 --- a/test/test_tictactoe.c +++ b/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();