-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgame.h
More file actions
34 lines (19 loc) · 805 Bytes
/
Copy pathgame.h
File metadata and controls
34 lines (19 loc) · 805 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <SDL.h>
#include "structs.h"
#include "file.h"
#ifndef SNAKEWKP_GAME_H
#define SNAKEWKP_GAME_H
void HandleInput(game_t *game);
void HandleMovement(snake_t *snake, SDL_Rect gameBoard);
void HandlePortals(snake_t *snake, point_t *portalPos, int portal_count);
const char *HandleKeyboard(state_et *state);
int HandleScoreInput(const char *key, char name[3 + 1]);
int CheckSelfCollision(snake_t *snake);
int CheckBorderCollision(SDL_Rect gameBoard, point_t snakeHead);
void CheckFruitCollision(game_t *game);
void PlaceObject(game_t *game, object_type_et type);
void RemoveObject(game_t *game, object_type_et type);
char *GetStateKey(state_et state);
char *GetInputStateKey(input_et state);
void GetAutoDirection(point_t *objects, snake_t *snake, int tryNum);
#endif //SNAKEWKP_GAME_H