diff options
Diffstat (limited to 'web/web_match.h')
-rw-r--r-- | web/web_match.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/web/web_match.h b/web/web_match.h index ae5eff0..715be76 100644 --- a/web/web_match.h +++ b/web/web_match.h @@ -8,19 +8,31 @@ enum match_mode { M_PVC = M_FIRST, M_P, M_PVP, - M_LAST = M_PVP + M_CVC, + M_LAST = M_CVC +}; + +enum player_type { + PT_USER, + PT_COMP }; struct match_state { + int id; enum match_mode mode; - struct leg *legs[2]; + + struct leg **legs; + enum player_type *player_types; + int *comp_undone; + int num_players, size_players; + int active_player; - int boat_undone; int num_darts; }; struct match_opts { enum match_mode mode; + enum player_type p1_type, p2_type; char *p1_name, *p2_name; int start_pts; int throws_first; @@ -29,6 +41,8 @@ struct match_opts { extern struct match_state *state; 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_free(); |