summaryrefslogtreecommitdiff
path: root/web/web_scoreboard.c
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-05-21 02:11:04 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-05-21 02:11:04 -0700
commit35f311f779c039423fc7e2a11f98703c40201846 (patch)
tree334bbc27c966e2336555e71acef49b0839360570 /web/web_scoreboard.c
parentf5272c406c363013b10b801785900c5ae5bf5b79 (diff)
downloaddartboat-35f311f779c039423fc7e2a11f98703c40201846.tar.gz
dartboat-35f311f779c039423fc7e2a11f98703c40201846.tar.xz
web: show full visit log when player 3 or higher starts
Diffstat (limited to 'web/web_scoreboard.c')
-rw-r--r--web/web_scoreboard.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/web/web_scoreboard.c b/web/web_scoreboard.c
index 62b4c0f..3b5993a 100644
--- a/web/web_scoreboard.c
+++ b/web/web_scoreboard.c
@@ -287,9 +287,11 @@ void draw_visits_dense()
int np = match_num_players();
dom_set_style_property_int("--num-players", np);
- // FIXME
- int n_visits = state->legs[0]->n_visits > state->legs[1]->n_visits ?
- state->legs[0]->n_visits : state->legs[1]->n_visits;
+ int n_visits = 0;
+ for (int i = 0; i < np; ++i) {
+ if (state->legs[i]->n_visits > n_visits)
+ n_visits = state->legs[i]->n_visits;
+ }
struct dom_elem **elemv = malloc(
(np * 2 + 1) * (2 * n_visits + 2) * sizeof(*elemv));