diff options
| author | Andrey A. Chernov <ache@FreeBSD.org> | 1997-09-24 23:33:25 +0000 |
|---|---|---|
| committer | Andrey A. Chernov <ache@FreeBSD.org> | 1997-09-24 23:33:25 +0000 |
| commit | 2e210bcd36646a8da3afd07e5f309360732cb38d (patch) | |
| tree | 1a9cd2c619916fe1355c3be8eae4baafd9bf20ea /games | |
| parent | 44ab5c33e1e2b711053a84e7b98394eed5fb6cfc (diff) | |
Notes
Diffstat (limited to 'games')
| -rw-r--r-- | games/snake/snake/snake.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/games/snake/snake/snake.c b/games/snake/snake/snake.c index b9776cbbcb29..6325406b3171 100644 --- a/games/snake/snake/snake.c +++ b/games/snake/snake/snake.c @@ -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); |
