diff options
Diffstat (limited to 'dartboat.c')
-rw-r--r-- | dartboat.c | 22 |
1 files changed, 14 insertions, 8 deletions
@@ -43,16 +43,19 @@ void user_visit(struct leg *l) if (l->rem <= 170) { char *target = CHECKOUTS[2][l->rem-1]; if (target) { - int trem = l->rem - segment_points(segment_from_name(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)); + 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, + "-%s", target); } } len += sprintf(status + len, ")"); @@ -118,18 +121,20 @@ void curses_match(int start_points, char *n1, void (*f1)(struct leg *), void cvc_curses_match(int start_points) { - curses_match(start_points, "Dartboat 1", comp_visit, "Dartboat 2", - comp_visit); + curses_match(start_points, "Dartboat 1", comp_visit, + "Dartboat 2", comp_visit); } void pvc_curses_match(int start_points) { - curses_match(start_points, "David", user_visit, "Dartboat", comp_visit); + curses_match(start_points, "David", user_visit, + "Dartboat", comp_visit); } void pvp_curses_match(int start_points) { - curses_match(start_points, "David", user_visit, "Davidn't", user_visit); + curses_match(start_points, "David", user_visit, + "Davidn't", user_visit); } void test_averages() @@ -146,7 +151,8 @@ void test_averages() comp_visit(l); leg_free(l); - darts += (l->n_visits-1)*3 + l->visits[l->n_visits-1].n_darts; + darts += (l->n_visits - 1) * 3 + + l->visits[l->n_visits-1].n_darts; } printf("%d %f\n", stdev, (double)(501*rounds)/darts*3); |