diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-05-20 15:03:44 -0700 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-05-20 15:03:44 -0700 |
commit | 6fb1750b923b97a377d6ef8ad4a25b501e65b39d (patch) | |
tree | 07fd49ffd6ea14b528725c99f511136a1ea54fb3 /web/web_control.c | |
parent | 7433d87aef18955468027a79edd9bb50c4db8275 (diff) | |
download | dartboat-6fb1750b923b97a377d6ef8ad4a25b501e65b39d.tar.gz dartboat-6fb1750b923b97a377d6ef8ad4a25b501e65b39d.tar.xz |
web: support visit log for 3+ player matches
The new match modes are for testing. They'll eventually be removed in
favour of true configurability.
Diffstat (limited to 'web/web_control.c')
-rw-r--r-- | web/web_control.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/web/web_control.c b/web/web_control.c index b0a777c..ca45ed4 100644 --- a/web/web_control.c +++ b/web/web_control.c @@ -263,6 +263,10 @@ void match_mode_selected(int mode) } 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(); @@ -278,6 +282,10 @@ void start_match() match_opts->p2_name ? match_opts->p2_name : "oi"); if (match_opts->mode == M_PVPVP) match_add_player(match_opts->start_pts, PT_USER, "Player 3"); + else if (match_opts->mode == M_PVCVCVC) { + match_add_player(match_opts->start_pts, PT_COMP, "Computer 2"); + match_add_player(match_opts->start_pts, PT_COMP, "Computer 3"); + } scoreboard_show_info(match_num_players()); for (int i = 1; i <= match_num_players(); ++i) { |