diff options
Diffstat (limited to 'dartbot.c')
-rw-r--r-- | dartbot.c | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -376,7 +376,23 @@ void user_visit(struct leg *l) struct visit *v = l->visits + l->n_visits++; char status[100]; - sprintf(status, "%d remaining", l->rem); + int len = sprintf(status, "%d remaining", l->rem); + char *target = CHECKOUTS[2][l->rem-1]; + if (target) { + int trem = l->rem - segment_points(segment_from_name(target)); + len += sprintf(status + len, " (%s", target); + if (trem) { + target = CHECKOUTS[1][trem-1]; + len += sprintf(status + len, "-%s", target); + trem = trem - segment_points(segment_from_name(target)); + + if (trem) { + target = CHECKOUTS[0][trem-1]; + len += sprintf(status + len, "-%s", target); + } + } + len += sprintf(status + len, ")"); + } char prompt[] = "enter points> "; curses_status(status); curses_prompt(prompt); |