Soirée Peer Programming avec Marco ORFAO : Création des pommes, ajouts de nouveaux modes de jeux, création de fichier .h, correction de bug etc...
This commit is contained in:
10
include/grille.h
Normal file
10
include/grille.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#ifndef GRILLE_H
|
||||
#define GRILLE_H
|
||||
|
||||
#define TAILLE_CASE 20
|
||||
#define LARGEUR_GRILLE 60
|
||||
#define HAUTEUR_GRILLE 40
|
||||
|
||||
void dessinerGrille(void);
|
||||
|
||||
#endif /*GRILLE_H*/
|
6
include/main.h
Normal file
6
include/main.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#ifndef MAIN_H
|
||||
#define MAIN_H
|
||||
|
||||
int main(void);
|
||||
|
||||
#endif /*MAIN_H*/
|
12
include/menu.h
Normal file
12
include/menu.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#ifndef MENU_H
|
||||
#define MENU_H
|
||||
|
||||
|
||||
void afficherMenuPrincipal(void);
|
||||
void afficherMenuModesDeJeu(void);
|
||||
void afficherMenuGameOver(void);
|
||||
int attendreChoixGameOver(void);
|
||||
int attendreChoixModesDeJeu(void);
|
||||
int attendreChoixMenu(void);
|
||||
|
||||
#endif /*MENU_H*/
|
16
include/pomme.h
Normal file
16
include/pomme.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#ifndef POMME_H
|
||||
#define POMME_H
|
||||
|
||||
#include "../include/grille.h"
|
||||
#include "../include/serpent.h"
|
||||
|
||||
typedef struct {
|
||||
int x;
|
||||
int y;
|
||||
} Pomme;
|
||||
|
||||
Pomme creerPomme();
|
||||
void dessinerPomme(Pomme pomme);
|
||||
int verifierCollisionPommeSerpent(Pomme pomme, Segment serpent[], int longueur);
|
||||
|
||||
#endif /*POMME_H*/
|
@@ -1,14 +1,13 @@
|
||||
#ifndef SERPENT_H
|
||||
#define SERPENT_H
|
||||
|
||||
|
||||
typedef struct {
|
||||
int x, y;
|
||||
} Segment;
|
||||
|
||||
void initialiserSerpent(Segment serpent[], int *longueur);
|
||||
void gestionDeplacements(Segment serpent[], int *direction_x, int *direction_y);
|
||||
int tuerSerpent(Segment serpent[]);
|
||||
int tuerSerpent(Segment serpent[], int longueur);
|
||||
void mettreAJourSerpent(Segment serpent[], int *longueur, int *direction_x, int *direction_y);
|
||||
void dessinerSerpent(Segment serpent[], int *longueur);
|
||||
int seMangerQueue(Segment serpent[], int longueur);
|
||||
|
Reference in New Issue
Block a user