Browse Source

9 win condition column

remotes/origin/Simon
Simon Hildebrandt 11 months ago
parent
commit
65918b52a6
  1. 9
      src/main/c/TicTacToe.c

9
src/main/c/TicTacToe.c

@ -35,4 +35,13 @@ int Winner(char Feld[3][3]) {
else return 2; 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;
}
}
} }
Loading…
Cancel
Save