31 lines
697 B
C
31 lines
697 B
C
#ifndef FONCTION_H
|
|
#define FONCTION_H
|
|
|
|
#include <stdlib.h>
|
|
#include <stdbool.h>
|
|
|
|
#define EMPTY 0
|
|
#define WALL 1
|
|
#define BOX 2
|
|
#define TARGET 3
|
|
#define BOX_ON_TARGET 4
|
|
#define PLAYER 5
|
|
#define PLAYER_ON_TARGET 6
|
|
typedef struct Vecteur
|
|
{
|
|
int x;
|
|
int y;
|
|
} vect;
|
|
|
|
|
|
unsigned short int **creatArea2D(const unsigned 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);
|
|
bool islose(unsigned short int ** tab2d,const int N);
|
|
bool blockBox(unsigned short int **tab2d, const int N, vect box_coor);
|
|
#endif // FONCTION_H
|
|
|
|
|
|
|