~ecs/tbrace

tbrace/state.h -rw-r--r-- 437 bytes
f007a19d — Eyal Sawady Makefile: rewrite 10 months ago
                                                                                
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
#ifndef STATE_H
#define STATE_H
struct car {
	int x;
	int y;
	int vel_x;
	int vel_y;
	unsigned laps;
};

enum tile {
	EMPTY,
	WALL,
	CAR,
	LAPLINE_UP,
	LAPLINE_DOWN,
	LAPLINE_LEFT,
	LAPLINE_RIGHT
};

struct state {
	unsigned num_cars;
	struct car *cars;
	int track_x;
	int track_y;
	enum tile **track;
	unsigned ticks;
};

struct state* load_state();
void destroy_state(struct state *state);
void print_track(struct state state);
#endif