From f770bfd5d647d60b268f0a267b006343b50c2aaa Mon Sep 17 00:00:00 2001 From: fdai7775 Date: Tue, 30 Jan 2024 11:58:28 +0000 Subject: [PATCH] Verification function --- src/main/c/GameTic_Tac_Toe/game.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/c/GameTic_Tac_Toe/game.c b/src/main/c/GameTic_Tac_Toe/game.c index a91ba51..6432f7f 100644 --- a/src/main/c/GameTic_Tac_Toe/game.c +++ b/src/main/c/GameTic_Tac_Toe/game.c @@ -32,3 +32,15 @@ char checkWinner() { // Kein Gewinner return ' '; } + +// Funktion zur Überprüfung, ob das Spiel unentschieden ist +int isBoardFull() { + for (int i = 0; i < 3; i++) { + for (int j = 0; j < 3; j++) { + if (board[i][j] != 'X' && board[i][j] != 'O') { + return 0; + } + } + } + return 1; +}