summaryrefslogtreecommitdiff
path: root/web/web_match.h
blob: 478ad88b493aeb3892af15db614f317271218f22 (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
#ifndef WEB_MATCH_H
#define WEB_MATCH_H

#include "match.h"

enum match_mode {
	M_FIRST = 1,
	M_PVC = M_FIRST,
	M_P,
	M_PVP,
	M_LAST = M_PVP
};

struct match_state {
	enum match_mode mode;
	struct leg *legs[2];
	struct leg *active_leg;
	int active_player;
	int boat_undone;
	int num_darts;
};

extern struct match_state *state;

void free_state();

bool match_is_over();

#endif