summaryrefslogtreecommitdiff
path: root/web/web_match.h
diff options
context:
space:
mode:
Diffstat (limited to 'web/web_match.h')
-rw-r--r--web/web_match.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/web/web_match.h b/web/web_match.h
new file mode 100644
index 0000000..4b4c7bb
--- /dev/null
+++ b/web/web_match.h
@@ -0,0 +1,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 is_match_over();
+
+#endif