Problème afficher par les warning régler en plus de pouvoir rejouer :)

This commit is contained in:
2024-11-19 13:36:11 +01:00
parent 194076b002
commit 52ad6e1bbb
18 changed files with 50 additions and 101 deletions

15
jeu.c
View File

@@ -6,21 +6,22 @@
int Jeu(){
int choix[2], taille = 0, victoire = 0;
Menu(choix);
Menu(choix); /* Affiche le menu */
taille = choix[1];
if(choix[0] == 1){
if(choix[0] == 1){ /* Si l'utilisateur choisie Player VS Player */
victoire = compJCJ(taille);
if(victoire == 1){
if(victoire == 1){ /* Si le joueur 1 a gagner alors retourner 1 */
return 1;
}else if(victoire == 2){
return 2;
return 2; /* Si le joueur 2 a gagner alors retourner 2 */
}
}else if (choix[0] == 2){
}else if (choix[0] == 2){ /* Si l'utilisateur choisie Player VS IA */
compJCIA(taille);
if(victoire == 1){
return 1;
return 1; /* Si le joueur 1 a gagner alors retourner 1 */
}else if(victoire == 3){
return 3;
return 3; /* Si l'IA a gagner alors retourner 3 */
}
}
return 0;
}