Fix
This commit is contained in:
40
include/jeu.h
Normal file
40
include/jeu.h
Normal file
@@ -0,0 +1,40 @@
|
||||
#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 */
|
||||
15
include/jeu_humain.h
Normal file
15
include/jeu_humain.h
Normal file
@@ -0,0 +1,15 @@
|
||||
#ifndef JEU_HUMAIN_H
|
||||
#define JEU_HUMAIN_H
|
||||
|
||||
#include "jeu.h"
|
||||
|
||||
/* Fonction qui gère le mode humain */
|
||||
void jouerModeHumain(struct EtatJeu *etatJeu);
|
||||
|
||||
/* Fonction qui gère le placement initial */
|
||||
void gererPlacementInitial(struct EtatJeu *etatJeu);
|
||||
|
||||
/* Fonction qui gère le tour du joueur */
|
||||
void gererTourJoueur(struct EtatJeu *etatJeu);
|
||||
|
||||
#endif
|
||||
24
include/jeu_ia.h
Normal file
24
include/jeu_ia.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#ifndef JEU_IA_H_INCLUS
|
||||
#define JEU_IA_H_INCLUS
|
||||
|
||||
#include "jeu.h"
|
||||
|
||||
/* Fonction qui gère le mode IA */
|
||||
void jouerModeIA(struct EtatJeu *etatJeu);
|
||||
|
||||
/* Fonction qui gère le placement initial IA */
|
||||
void gererPlacementInitialIA(struct EtatJeu *etatJeu);
|
||||
|
||||
/* Fonction qui gère le tour du joueur IA */
|
||||
void gererTourJoueurIA(struct EtatJeu *etatJeu);
|
||||
|
||||
/* Fonction qui gère le placement de l'IA */
|
||||
void placementIA(struct EtatJeu *etatJeu);
|
||||
|
||||
/* Fonction qui gère le déplacement de l'IA */
|
||||
void deplacementIA(struct EtatJeu *etatJeu);
|
||||
|
||||
/* Fonction qui gère le blocage de l'IA */
|
||||
void blocageIA(struct EtatJeu *etatJeu);
|
||||
|
||||
#endif /* JEU_IA_H_INCLUS */
|
||||
Reference in New Issue
Block a user