From 35fa2b71ffe3a19040104ba1a1e96d7a0eefce73 Mon Sep 17 00:00:00 2001 From: Simon Hildebrandt Date: Wed, 7 Feb 2024 17:20:01 +0100 Subject: [PATCH] 20 move O --- src/main/c/TicTacToe.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/c/TicTacToe.c b/src/main/c/TicTacToe.c index 29ac1fe..024f326 100644 --- a/src/main/c/TicTacToe.c +++ b/src/main/c/TicTacToe.c @@ -3,6 +3,7 @@ #include #include +int Zaehler = 1; // Funktion, um das Spielfeld zu initialisieren void Brett(char Feld[3][3]) { for (int i = 0; i < 3; i++) { @@ -64,4 +65,11 @@ int Winner(char Feld[3][3]) { //Bestätige Unendschieden printf("Es ist ein Unendschieden\n"); return 0; +} +void Zuege(char Feld[3][3], int row, int col) { + if (Zaehler % 2 == 0) { + if (Feld[row][col] == '_') { + Feld[row][col] = 'O'; + } + } } \ No newline at end of file