You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Zig standard library avoids hidden global state, so rather than keeping a random number generator of your own, your functions receive a [`std.Random`][random] interface to draw values from.
6
+
The tests pass in a generator seeded with [`std.testing.random_seed`][random-seed], and check that generators with the same seed produce the same characters.
7
+
8
+
## Checking randomness
9
+
10
+
The distribution of your ability scores is checked by [chi-squared tests][chi-squared-test] at a [significance level][p-value] of `p < 0.0001`:
11
+
12
+
- the scores returned by `ability` are compared with the expected distribution;
13
+
- each of a character's six abilities is compared with the expected distribution;
14
+
- the pattern of odd and even scores across a character's six abilities is compared with what independent abilities would produce.
15
+
16
+
A correct implementation has less than a 0.01% chance of failing each test.
17
+
18
+
See the instructions above for a definition of what an ability score is.
0 commit comments