40 lines
1021 B
C
40 lines
1021 B
C
#ifndef JEU_H_INCLUS
|
|
#define JEU_H_INCLUS
|
|
|
|
/* Structure qui représente une position sur la grille */
|
|
struct Position {
|
|
int x;
|
|
int y;
|
|
};
|
|
|
|
/* Structure qui représente l'état du jeu */
|
|
struct EtatJeu {
|
|
int tailleGrille;
|
|
int mode;
|
|
int tourJoueur;
|
|
int phase;
|
|
struct Position joueur1;
|
|
struct Position joueur2;
|
|
int** grille;
|
|
};
|
|
|
|
/* Fonction qui initialise le jeu */
|
|
struct EtatJeu initialiserJeu(int tailleGrille, int mode);
|
|
|
|
/* Fonction qui dessine la grille de jeu */
|
|
void dessinerGrille(struct EtatJeu etatJeu);
|
|
|
|
/* Fonction qui vérifie si le joueur a gagné la partie */
|
|
int verifierVictoire(struct EtatJeu etatJeu);
|
|
|
|
/* Fonction qui affiche le gagnant de la partie */
|
|
void afficherVictoire(int gagnant);
|
|
|
|
/* Fonction qui vérifie si deux cases sont adjacentes */
|
|
int estCaseAdjacente(struct Position pos1, struct Position pos2);
|
|
|
|
/* Fonction qui vérifie si le joueur peut déplacer son pion */
|
|
int peutDeplacer(struct EtatJeu etatJeu, int joueur);
|
|
|
|
#endif /* JEU_H_INCLUS */
|