From 90b5ca5e47f0fda21f8da6cb9857a35e0f4730a3 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Mon, 9 May 2022 23:39:12 -0700 Subject: web: allow selection of starting points and user to throw first This new option selection code is a bit messy for now. It requires the options and their order to be in sync between the prompt functions and the corresponding submit functions. There's also a bit too much repetition of generic code that's applicable to all options. --- web/web_match.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'web/web_match.h') diff --git a/web/web_match.h b/web/web_match.h index 478ad88..56117b5 100644 --- a/web/web_match.h +++ b/web/web_match.h @@ -20,9 +20,18 @@ struct match_state { int num_darts; }; +struct match_opts { + enum match_mode mode; + char *p1_name, *p2_name; + int start_pts; + int throws_first; +}; + extern struct match_state *state; +extern struct match_opts *match_opts; void free_state(); +void match_opts_free(); bool match_is_over(); -- cgit v1.2.3-70-g09d2