From 2aeeb25b1ba76ad66d203c7a609516daa79b3569 Mon Sep 17 00:00:00 2001 From: Henri Montjoie <henri.montjoie@insa-rennes.fr> Date: Tue, 3 May 2016 19:44:54 +0200 Subject: [PATCH] correction d'une erreur dans la fonction ajouterunjoueur --- src/SDL_bis.c | 2 +- src/controleur.c | 2 +- src/controleur.h | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/SDL_bis.c b/src/SDL_bis.c index 84b2bfd..c389ca0 100644 --- a/src/SDL_bis.c +++ b/src/SDL_bis.c @@ -4,6 +4,7 @@ #include <SDL/SDL_ttf.h> #include "SDL.h" #include "structures.h" +#include "controleur.h" @@ -88,7 +89,6 @@ int SDL_bis() SDL_BlitSurface(rectangle,NULL,ecran,&pos_texte); SDL_Flip(ecran); - while(etat==LANCEMENT) { SDL_WaitEvent(&event); diff --git a/src/controleur.c b/src/controleur.c index 65ec869..edc8193 100644 --- a/src/controleur.c +++ b/src/controleur.c @@ -37,7 +37,7 @@ void initJeu(){ Joueur * j = nouveauJoueur(); if(j!=NULL){ setNomJoueur(j,nomDuJoueur); - if(addParticipant(partieGlobale,j)){ + if(addParticipant(partieGlobale,j)==0){ *etat =LANCEMENT; } else{ diff --git a/src/controleur.h b/src/controleur.h index c14fa45..0c2a321 100644 --- a/src/controleur.h +++ b/src/controleur.h @@ -9,6 +9,7 @@ #define CONTROLEUR_H void initJeu(); + void ajouterUnJoueur(char * nomDuJoueur, EtatsJeu * etat); #endif // CONTROLEUR_H -- GitLab