From fcc02efbff337c05bf448231cd8bfbe016939f8a Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Thu, 28 Apr 2022 13:13:14 -0700 Subject: web: the bot should have his own dartboard --- comp.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'comp.c') diff --git a/comp.c b/comp.c index c0a673a..9427363 100644 --- a/comp.c +++ b/comp.c @@ -84,6 +84,7 @@ void comp_visit(struct leg *l) { struct visit *v = l->visits + l->n_visits++; v->darts = calloc(3, sizeof(*(v->darts))); + v->ccoords = calloc(3, sizeof(*(v->ccoords))); for (int i = 0; i < 3; ++i) { struct segment ts = next_dart(l->rem - v->points, 3 - i); @@ -91,6 +92,7 @@ void comp_visit(struct leg *l) struct pcoords dc = throw_dart(tc); struct segment ds = get_segment(dc); + v->ccoords[v->n_darts] = pol_to_cart(dc); // FIXME double conversion v->darts[v->n_darts++] = ds; v->points += segment_points(ds); -- cgit v1.2.3-70-g09d2