Add correct name of player

This commit is contained in:
Mylloon 2022-01-02 18:09:16 +01:00
parent d554c4d7a1
commit 940e837654
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -355,8 +355,10 @@ void idle(void) {
if(trouveA == 0 && trouveB == 0) mort = 4; if(trouveA == 0 && trouveB == 0) mort = 4;
if(mort != 0) { if(mort != 0) {
char joueur = 'B';
if(mort == 2) joueur = 'A';
if(mort == 4) printf("TERMINÉ ! TOUT LE MONDE A PERDU !\n"); if(mort == 4) printf("TERMINÉ ! TOUT LE MONDE A PERDU !\n");
else printf("TERMINÉ ! JOUEUR %d A PERDU !\n", mort); else printf("TERMINÉ ! JOUEUR %c A PERDU !\n", joueur);
sortie(); sortie();
exit(0); exit(0);
} }
@ -462,8 +464,10 @@ void idle(void) {
if(trouveA == 0 && trouveB == 0) mort = 4; if(trouveA == 0 && trouveB == 0) mort = 4;
if(mort != 0) { if(mort != 0) {
char joueur = 'B';
if(mort == 2) joueur = 'A';
if(mort == 4) printf("TERMINÉ ! TOUT LE MONDE A PERDU !\n"); if(mort == 4) printf("TERMINÉ ! TOUT LE MONDE A PERDU !\n");
else printf("TERMINÉ ! JOUEUR %d A PERDU !\n", mort); else printf("TERMINÉ ! JOUEUR %c A PERDU !\n", joueur);
sortie(); sortie();
exit(0); exit(0);
} }