diff --git a/src/main/c/TicTacToe.c b/src/main/c/TicTacToe.c index 31999f4..762fcb3 100644 --- a/src/main/c/TicTacToe.c +++ b/src/main/c/TicTacToe.c @@ -23,4 +23,16 @@ void Bild(char Feld[3][3]) { } printf("\n"); } +} +int Entscheiden(char Feld[3][3]) { + // Überprüfen Sieg + // Überprüfen Reihen + for (int i = 0; i < 3; i++) { + if (Feld[i][0] == Feld[i][1] && Feld[i][1] == Feld[i][2] && Feld[i][0] != '_') { + if (Feld[i][0] == 'X') { + return 1; + } + else return 2; + } + } } \ No newline at end of file