summaryrefslogtreecommitdiff
path: root/web/web_control.c
diff options
context:
space:
mode:
Diffstat (limited to 'web/web_control.c')
-rw-r--r--web/web_control.c43
1 files changed, 1 insertions, 42 deletions
diff --git a/web/web_control.c b/web/web_control.c
index ca45ed4..a5edb82 100644
--- a/web/web_control.c
+++ b/web/web_control.c
@@ -124,7 +124,7 @@ void boat_visit()
void handle_next()
{
if (!state) {
- prompt_select_mode();
+ prompt_main_menu();
} else if (match_is_over()) {
if (state->num_darts ||
match_player_is_comp(match_winning_player()))
@@ -232,47 +232,6 @@ void user_num_darts(int n)
handle_next();
}
-void match_mode_selected(int mode)
-{
- if (mode < M_FIRST || mode > M_LAST) {
- oi();
- return;
- }
-
- if (match_opts) match_opts_free();
- match_opts = calloc(1, sizeof(*match_opts));
- match_opts->mode = mode;
- match_opts->start_pts = 501;
- match_opts->throws_first = 1;
- // names need to be freed if we stop using string literals
- if (mode == M_PVC) {
- match_opts->p1_name = "User";
- match_opts->p2_name = "Computer";
- match_opts->p2_type = PT_COMP;
- } else if (mode == M_P) {
- match_opts->p1_name = "Player 1";
- match_opts->p2_name = NULL;
- } else if (mode == M_PVP) {
- match_opts->p1_name = "Player 1";
- match_opts->p2_name = "Player 2";
- } else if (mode == M_CVC) {
- match_opts->p1_name = "Computer 1";
- match_opts->p1_type = PT_COMP;
- match_opts->p2_name = "Computer 2";
- match_opts->p2_type = PT_COMP;
- } else if (mode == M_PVPVP) {
- match_opts->p1_name = "Player 1";
- match_opts->p2_name = "Player 2";
- } else if (mode == M_PVCVCVC) {
- match_opts->p1_name = "User";
- match_opts->p2_type = PT_COMP;
- match_opts->p2_name = "Computer 1";
- }
-
- prompt_match_opts();
- prompt_flush();
-}
-
void start_match()
{
match_new();