diff --git a/src/main/c/TicTacToe.c b/src/main/c/TicTacToe.c index d6a2860..035d6c4 100644 --- a/src/main/c/TicTacToe.c +++ b/src/main/c/TicTacToe.c @@ -35,4 +35,13 @@ int Winner(char Feld[3][3]) { else return 2; } } + // Überprüfen Spalten + for (int j = 0; j < 3; j++) { + if (Feld[0][j] == Feld[1][j] && Feld[1][j] == Feld[2][j] && Feld[0][j] != '_') { + if (Feld[0][j] == 'X') { + return 1; + } + else return 2; + } + } } \ No newline at end of file