Rendu tp3
This commit is contained in:
13
grid.h
13
grid.h
@@ -2,18 +2,23 @@
|
||||
#define GRID_H
|
||||
|
||||
#include <MLV/MLV_all.h>
|
||||
#include "snake.h"
|
||||
|
||||
#define NBL 22
|
||||
#define NBC 36
|
||||
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
WALL = 'w',
|
||||
EMPTY = ' ',
|
||||
FRUIT = 'f'
|
||||
FRUIT = 'f',
|
||||
SNAKE = 's'
|
||||
} Element;
|
||||
|
||||
void debug(char grid[NBL][NBC+1]);
|
||||
void debug(char grid[NBL][NBC + 1]);
|
||||
int compute_size(int w, int h);
|
||||
void draw_grid(char grid[NBL][NBC+1]);
|
||||
void draw_grid(char grid[NBL][NBC + 1]);
|
||||
void place_snake(char grid[NBL][NBC + 1], Snake *snake);
|
||||
void move_snake(Snake* snake, char grid[NBL][NBC+1]);
|
||||
|
||||
#endif /* GRID_H */
|
||||
Reference in New Issue
Block a user