summaryrefslogtreecommitdiff
path: root/comp.c
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-04-20 05:04:22 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-04-20 05:04:22 -0700
commit6d399b63a4d0f29169c06e119fc56fce465c4a55 (patch)
treeadf660f3a91e9d6e6f7e5c743dcc0bae041cbab3 /comp.c
parent0e5bed93b93eeed3481e862e988c10303a04f98e (diff)
downloaddartboat-6d399b63a4d0f29169c06e119fc56fce465c4a55.tar.gz
dartboat-6d399b63a4d0f29169c06e119fc56fce465c4a55.tar.xz
use reasonable setup shots when checkout is not possible
Diffstat (limited to 'comp.c')
-rw-r--r--comp.c5
1 files changed, 4 insertions, 1 deletions
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);
}