blob: 1dfdd58c3a1d03dd7cd59c3892823f5b62f43694 (
plain) (
blame)
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
|
#ifndef GAME_H
#define GAME_H
#include <peripheral.h>
#ifdef __cplusplus
extern "C"
{
#endif
enum
{
GAME_MAX_PLAYERS = 4,
GAME_PLAYER_NAME_LEN = 16
};
struct game_cfg
{
struct game_cfg_player
{
enum game_cfg_player_type
{
GAME_CFG_PLAYER_TYPE_HUMAN,
GAME_CFG_PLAYER_TYPE_BOT,
GAME_CFG_PLAYER_TYPE_NET
} type;
char name[GAME_PLAYER_NAME_LEN];
} *players;
size_t n;
union peripheral *p;
const char *map;
};
int game_resinit(void);
int game(const struct game_cfg *cfg);
void game_free(void);
#ifdef __cplusplus
}
#endif
#endif /* GAME_H */
|