Browse Source

Pruefung auf Gewinn fuer Position 2, 5, 8

remotes/origin/tictactoedev
Sabina Grisi 12 months ago
parent
commit
5587df5a37
  1. 8
      src/TicTacToe.c

8
src/TicTacToe.c

@ -89,6 +89,14 @@ int main() {
printf("\nSpieler O hat gewonnen!\n\n");
break;
}
} else if (pos2 == player && pos5 == player && pos8 == player) {
if(player == 10){
printf("\nSpieler X hat gewonnen!\n\n");
break;
}else{
printf("\nSpieler O hat gewonnen!\n\n");
break;
}
}
player = switchPlayer(player);

Loading…
Cancel
Save