Files
snake2025/snake.h
2025-05-14 14:15:45 +02:00

28 lines
294 B
C

#ifndef SNAKE_H
#define SNAKE_H
#define SNAKE_SIZE 4
typedef struct
{
int x;
int y;
} Coord;
typedef enum
{
TOP,
BOTTOM,
LEFT,
RIGHT
} Direction;
typedef struct
{
Coord pos[SNAKE_SIZE];
Direction dir;
} Snake;
void crawl(Snake *snake);
#endif /* SNAKE_H */