diff options
Diffstat (limited to 'dartboat.c')
-rw-r--r-- | dartboat.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -138,21 +138,22 @@ void test_averages() { int rounds = 100000; - for (int stdev = 4; stdev < 25; ++stdev) { - horizontal_stdev = vertical_stdev = stdev; + for (int diff = 0; diff <= 99; ++diff) { + comp_set_difficulty(diff); int darts = 0; for (int i = 0; i < rounds; ++i) { struct leg *l = leg_init(501); while (l->rem > 0) comp_visit(l); - leg_free(l); darts += (l->n_visits - 1) * 3 + l->visits[l->n_visits-1].n_darts; + leg_free(l); } - printf("%d %f\n", stdev, (double)(501*rounds)/darts*3); + printf("%d %f %f\n", diff, horizontal_stdev, + (double)(501 * rounds) / darts * 3); } } |