Peer Working : Ajout de nouveaux modes de jeux

This commit is contained in:
stiti
2023-12-09 21:43:13 +01:00
parent f52863c44e
commit 64c5fc17a6
13 changed files with 304 additions and 82 deletions

View File

@@ -2,10 +2,12 @@
#define JEU_H
void afficherScore(int score);
void lancer_jeu1(void);
void lancer_jeu2(void);
void lancer_jeu3(void);
void lancer_jeu4(void);
void lancer_jeu5(void);
#endif /*JEU_H*/

17
include/obstacle.h Normal file
View File

@@ -0,0 +1,17 @@
#ifndef OBSTACLE_H
#define OBSTACLE_H
#include "../include/grille.h"
#include "../include/serpent.h"
typedef struct {
int x;
int y;
} Obstacle;
void dessinerObstacle(Obstacle obstacle);
int estCollisionObstacle(Obstacle obstacle, Segment serpent[], int longueur);
Obstacle creerObstacle(int largeurGrille, int hauteurGrille);
void placerObstacle(Obstacle obstacles[], int nombreObstacles, int largeurGrille, int hauteurGrille);
#endif /*OBSTACLE_H*/

View File

@@ -11,5 +11,6 @@ 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);
void attendreSerpent(unsigned long int microseconds);
#endif /*SERPENT_H*/

12
include/timer.h Normal file
View File

@@ -0,0 +1,12 @@
#ifndef TIMER_H
#define TIMER_H
unsigned long int attendre(void);
unsigned long int creer_timer(void);
int afficher_minute(int min);
int afficher_seconde(int sec);
#endif /*TIMER_H*/