mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-22 07:20:00 +00:00
Convert to random()
This commit is contained in:
parent
44ab5c33e1
commit
2e210bcd36
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=29836
@ -585,7 +585,7 @@ struct point *sp, *np;
|
||||
}
|
||||
for(w=i=0; i<8; i++)
|
||||
w+= wt[i];
|
||||
vp = (( rand() >> 6 ) & 01777) %w;
|
||||
vp = random() % w;
|
||||
for(i=0; i<8; i++)
|
||||
if (vp <wt[i])
|
||||
break;
|
||||
@ -787,7 +787,7 @@ pushsnake()
|
||||
{
|
||||
surround(&you);
|
||||
i = (cashvalue) % 10;
|
||||
bonus = ((rand()>>8) & 0377)% 10;
|
||||
bonus = random() % 10;
|
||||
ll();
|
||||
pr("%d\n", bonus);
|
||||
delay(30);
|
||||
|
Loading…
Reference in New Issue
Block a user