-
Notifications
You must be signed in to change notification settings - Fork 1
/
partie.h
43 lines (31 loc) · 1.01 KB
/
partie.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef PARTIE
#define PARTIE
#include "plateau.h"
struct Partie {
Plateau bateaux1;
Plateau bateaux2;
Plateau tirs1;
Plateau tirs2;
char joueur1[TAILLE_ENTREE];
char joueur2[TAILLE_ENTREE];
};
typedef struct Partie Partie;
void jouerPartie(Partie* p);
// Les prototypes privés
static void demanderBateauxAuJoueur(Partie* p, int joueur);
static void demanderTirAuJoueur(Partie* p, int joueur);
static void resultatsTirsJoueur(Partie* p, Coordonnee* tir, int joueur);
static bool tourJoueur(Partie* p, int joueur);
static int jouerTours(Partie* p);
static void gagnerPartie(Partie* p, int gagnant);
static void preparerPartie(Partie* p);
static void fermerPartie(Partie* p);
static void preparerPlateaux(Partie* p);
static Plateau* getBateaux(Partie* p, int joueur);
static Plateau* getTirs(Partie* p, int joueur);
static char* getJoueur(Partie* p, int joueur);
static bool tousBateauxTouches(Partie* p, int joueur);
static bool placerTir(Partie* p, int joueur, Coordonnee* tir);
// Les tests
void testsPartie();
#endif