Browse Source

Pruefung auf Gewinn fuer Position 3, 6, 9

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

8
src/TicTacToe.c

@ -97,6 +97,14 @@ int main() {
printf("\nSpieler O hat gewonnen!\n\n");
break;
}
} else if (pos3 == player && pos6 == player && pos9 == 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