From 7337e60819aca41101cdfe032ef59756aa9ae953 Mon Sep 17 00:00:00 2001 From: ColinDrieu <colin.drieu@insa-rennes.fr> Date: Mon, 21 Mar 2016 17:15:00 +0100 Subject: [PATCH] Ajout du fichier partie.h Le fichier partie.h definit les fonctions necessaires au deroulement d'une partie. Corrections sur le fichier joueur.h --- src/joueur.h | 6 +++++- src/partie.h | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 src/partie.h diff --git a/src/joueur.h b/src/joueur.h index 13f6431..6cf909b 100644 --- a/src/joueur.h +++ b/src/joueur.h @@ -9,9 +9,13 @@ #define JOUEUR_H Joueur * nouveauJoueur(); -void initJoueur(Joueur * j, char * nom); +int initJoueur(Joueur * j, char * nom); void deleteJoueur(Joueur * j); +char getNomJoueur(Joueur * j); +char setNomJoueur(Joueur * j, char * nom); + +Personnage * getPersonnage(Joueur * j, int i); int addPersonnage(Joueur * j, Personnage * p); int removePersonnage(Joueur * j, Personnage * p); diff --git a/src/partie.h b/src/partie.h new file mode 100644 index 0000000..f091240 --- /dev/null +++ b/src/partie.h @@ -0,0 +1,32 @@ +/*! +* \file partie.h +* \brief Fichier contenant les signatures des fonctions liees a la structure Partie. +*/ + +#include "structures.h" + +Partie * initPartie(); +void deletePartie(Partie * p); + +int getNbTour(Partie * p); +void augmenterNbTour(Partie * p); + +int addParticipant(Partie * p, Joueur * j); +int removeParticipant(Partie * p, Joueur * j); + +void debutTour(Partie * p, Joueur * j); +void finTour(Partie * p); + +int isTurn(Partie * p, Joueur * j); +Personnage * jouerPersonnage (Partie * p, Joueur * j, Personnage * perso); + +int victoire(Partie * p, Joueur * j); + +void finPartie(Partie * p); + +#ifndef PARTIE_H +#define PARTIE_H + + + +#endif // PARTIE_H -- GitLab