From 334825f98783cd8bdf6c839b0f2bfad2be0d2a09 Mon Sep 17 00:00:00 2001 From: Simon Hildebrandt Date: Wed, 7 Feb 2024 17:20:41 +0100 Subject: [PATCH] 21 move X --- src/main/c/TicTacToe.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/c/TicTacToe.c b/src/main/c/TicTacToe.c index 024f326..d46d3b3 100644 --- a/src/main/c/TicTacToe.c +++ b/src/main/c/TicTacToe.c @@ -69,7 +69,12 @@ int Winner(char Feld[3][3]) { void Zuege(char Feld[3][3], int row, int col) { if (Zaehler % 2 == 0) { if (Feld[row][col] == '_') { - Feld[row][col] = 'O'; + Feld[row][col] = 'O'; + } + } + else { + if (Feld[row][col] == '_') { + Feld[row][col] = 'X'; } } } \ No newline at end of file