Encapsulate direct use of random(), srandom() in chance.c
Wrap roll0() around random(), and seed_prng() around srandom(). In preparation of replacing the PRNG.
This commit is contained in:
parent
8eb78a5a80
commit
866859e912
17 changed files with 87 additions and 49 deletions
|
@ -331,7 +331,7 @@ launch_sat(struct plnstr *pp)
|
|||
}
|
||||
i = pp->pln_tech + pp->pln_effic;
|
||||
if (chance(1.0 - (i / (i + 50.0)))) {
|
||||
dir = DIR_FIRST + random() % 6;
|
||||
dir = DIR_FIRST + roll0(6);
|
||||
sx = xnorm(sx + diroff[dir][0]);
|
||||
sy = ynorm(sy + diroff[dir][1]);
|
||||
pr("Your trajectory was a little off.\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue