-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdebug.h
81 lines (65 loc) · 1.53 KB
/
debug.h
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#ifndef DEBUG_H
#define DEBUG_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include "../../dracula/src/room.h"
#include "../../dracula/src/ai.h"
#define INIT_WATER 2 // The starting number of water for each player
#define MAX_WATER 3 // The maximum number of water
#define INIT_LIGHT 3 // The starting number of light for each player
#define MAX_LIGHT 3 // The maximum number of light
#define PLAYER_HEALTH 5 // The starting health of the players
#define MAX_GARLIC 4 // The total number of garlica for each turn
#define DRACULA_HEALTH 3 // The starting health of dracula
#define DRACULA_MOVES 3 // The number of moves dracula can make per turn
#define PLAYER_COUNT 4 // The number of players in the game
#define ROOM_COUNT 21 // The number of rooms in the game
/**
* @brief All possible player actions.
*/
enum Action {
MOVE,
WATER,
LIGHT,
GARLIC,
END,
ACTION_ERROR
};
extern Room rooms[];
extern char *room_names[];
/**
* @brief Stores a single turn action.
*/
struct Turn {
enum Action action;
enum RoomName room_name;
};
/**
* @brief Information that is unique to each player.
*/
struct Player {
uint8_t num_water;
uint8_t num_light;
bool turn_skipped;
bool can_bite;
};
enum TokenKind {
Player1,
Player2,
Player3,
Player4,
Garlic,
Sunlight,
HolyWater,
NumTokenKinds
};
struct Token {
enum TokenKind kind;
enum RoomName room;
};
#define MAX_TOKENS 64
extern Room rooms[NUM_ROOMS];
#endif // DEBUG_H