Browse Source

Pruefung auf Gewinn fuer Position 4, 5, 6

remotes/origin/tictactoedev
Sabina Grisi 11 months ago
parent
commit
ed09ef7a9d
  1. 8
      src/TicTacToe.c

8
src/TicTacToe.c

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