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.h24
1 files changed, 9 insertions, 15 deletions
diff --git a/web/web_match.h b/web/web_match.h
index fc2dabe..0a5a71d 100644
--- a/web/web_match.h
+++ b/web/web_match.h
@@ -3,17 +3,6 @@
#include "match.h"
-enum match_mode {
- M_FIRST = 1,
- M_PVC = M_FIRST,
- M_P,
- M_PVP,
- M_CVC,
- M_PVPVP,
- M_PVCVCVC,
- M_LAST = M_PVCVCVC
-};
-
enum player_type {
PT_USER,
PT_COMP
@@ -21,7 +10,6 @@ enum player_type {
struct match_state {
int id;
- enum match_mode mode;
struct leg **legs;
enum player_type *player_types;
@@ -32,10 +20,14 @@ struct match_state {
int num_darts;
};
+struct match_opts_player {
+ char *name;
+ enum player_type type;
+};
+
struct match_opts {
- enum match_mode mode;
- enum player_type p1_type, p2_type;
- char *p1_name, *p2_name;
+ struct match_opts_player *players;
+ int num_players, size_players;
int start_pts;
int throws_first;
};
@@ -46,6 +38,8 @@ extern struct match_opts *match_opts;
void match_new();
void match_add_player(int start_pts, enum player_type type, char *name);
void free_state();
+void match_opts_new();
+void match_opts_add_player(enum player_type type, char *name);
void match_opts_free();
struct leg *state_active_leg();