From 748bd6725ff4298015e79d213158aa0413b2761f Mon Sep 17 00:00:00 2001 From: Simon Hildebrandt Date: Wed, 7 Feb 2024 18:26:21 +0100 Subject: [PATCH] refactoring: Brett -> initializeBoard --- src/main/c/TicTacToe.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/c/TicTacToe.c b/src/main/c/TicTacToe.c index 8bbd2da..517be63 100644 --- a/src/main/c/TicTacToe.c +++ b/src/main/c/TicTacToe.c @@ -10,7 +10,7 @@ int Runde = 1; // Funktion, um das Spielfeld zu initialisieren -void Brett(char Feld[3][3]) { +void initializeBoard(char Feld[3][3]) { for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { Feld[i][j] = '_'; @@ -38,6 +38,7 @@ void Bild(char Feld[3][3]) { printf("\n"); } } + int Winner(char Feld[3][3]) { // Überprüfen Sieg // Überprüfen Reihen @@ -128,7 +129,7 @@ int mainx() { scanf("%s", Name2); while (Nochmal[0] == 'W' || Nochmal[0] == 'w') { Runde = 1; - Brett(Feld); + initializeBoard(Feld); printf("%s, Was willst du sein, X oder O: ", Name1); scanf("%s", Spieler1); if (Spieler1[0] != 'X' && Spieler1[0] != 'O') {