From 6d399b63a4d0f29169c06e119fc56fce465c4a55 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Wed, 20 Apr 2022 05:04:22 -0700 Subject: use reasonable setup shots when checkout is not possible --- comp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'comp.c') diff --git a/comp.c b/comp.c index f1adb75..13b21a6 100644 --- a/comp.c +++ b/comp.c @@ -73,7 +73,10 @@ struct segment next_dart(int rem, int darts_in_hand) char *c = NULL; if (rem <= 170) c = CHECKOUTS[darts_in_hand-1][rem-1]; - if (!c) c = "T20"; + if (!c && rem <= 191) + c = SETUP_SHOTS[rem-1]; + if (!c) + c = "T20"; return segment_from_name(c); } -- cgit v1.2.3-70-g09d2