diff options
author | dholland <dholland@NetBSD.org> | 2009-05-25 00:37:27 +0000 |
---|---|---|
committer | dholland <dholland@NetBSD.org> | 2009-05-25 00:37:27 +0000 |
commit | 072f2a0f5b6a9a8b0eb6499bc8454af374cf2e99 (patch) | |
tree | 47ebfbfaa5df8a91968b387db92876d37b0564d8 /trek/setup.c | |
parent | 4c730d8ae51ddaf389942c8451278b1b6de2d205 (diff) | |
download | bsdgames-darwin-072f2a0f5b6a9a8b0eb6499bc8454af374cf2e99.tar.gz bsdgames-darwin-072f2a0f5b6a9a8b0eb6499bc8454af374cf2e99.tar.zst bsdgames-darwin-072f2a0f5b6a9a8b0eb6499bc8454af374cf2e99.zip |
Use random() instead of rand(), so we get something like random
numbers out.
This changes the "tournament codes"; that is, the same code will give
you a different game now from what it used to. (This is because the
codes are basically random seeds.) I really really doubt anyone cares
about this, especially since the tournament feature appears to be
undocumented.
Diffstat (limited to 'trek/setup.c')
-rw-r--r-- | trek/setup.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/trek/setup.c b/trek/setup.c index 249f1497..769cab26 100644 --- a/trek/setup.c +++ b/trek/setup.c @@ -1,4 +1,4 @@ -/* $NetBSD: setup.c,v 1.12 2009/05/24 21:44:56 dholland Exp $ */ +/* $NetBSD: setup.c,v 1.13 2009/05/25 00:37:27 dholland Exp $ */ /* * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)setup.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: setup.c,v 1.12 2009/05/24 21:44:56 dholland Exp $"); +__RCSID("$NetBSD: setup.c,v 1.13 2009/05/25 00:37:27 dholland Exp $"); #endif #endif /* not lint */ @@ -109,7 +109,7 @@ setup(void) d = 0; for (i = 0; Game.passwd[i]; i++) d += Game.passwd[i] << i; - srand(d); + srandom(d); } Param.bases = Now.bases = ranf(6 - Game.skill) + 2; if (Game.skill == 6) |