time + fix leak memories
This commit is contained in:
11
function.h
11
function.h
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include <time.h>
|
||||
|
||||
#define EMPTY 0
|
||||
#define WALL 1
|
||||
@@ -11,14 +12,24 @@
|
||||
#define BOX_ON_TARGET 4
|
||||
#define PLAYER 5
|
||||
#define PLAYER_ON_TARGET 6
|
||||
|
||||
typedef struct Vecteur
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
} vect;
|
||||
|
||||
typedef struct Score
|
||||
{
|
||||
time_t before;
|
||||
time_t after;
|
||||
unsigned int move_player;
|
||||
unsigned int move_box;
|
||||
} score;
|
||||
|
||||
|
||||
unsigned short int **creatArea2D(const unsigned int N);
|
||||
void free2D(unsigned short int **tab, int N);
|
||||
void screenDisplay( unsigned short int **tab,int size);
|
||||
void inGameLoop (unsigned short int **tab2d, int N, vect *playerPos, vect *targets, int nbr_targets);
|
||||
bool isWin(unsigned short int **tab2d, vect *targets, int nbr_targets);
|
||||
|
||||
Reference in New Issue
Block a user