summaryrefslogtreecommitdiffstats
path: root/mbbsd/dark.c
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-02-03 21:01:02 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-02-03 21:01:02 +0800
commit6a459a66d264a1eb8f8f62692ceb48c2ed1c0cf1 (patch)
tree15b4f6a8459b54dff38bd720c685ce9488dc0cf9 /mbbsd/dark.c
parent2f79c54e2b80a89272edad8b9d128c843c8d132e (diff)
downloadpttbbs-6a459a66d264a1eb8f8f62692ceb48c2ed1c0cf1.tar
pttbbs-6a459a66d264a1eb8f8f62692ceb48c2ed1c0cf1.tar.gz
pttbbs-6a459a66d264a1eb8f8f62692ceb48c2ed1c0cf1.tar.bz2
pttbbs-6a459a66d264a1eb8f8f62692ceb48c2ed1c0cf1.tar.lz
pttbbs-6a459a66d264a1eb8f8f62692ceb48c2ed1c0cf1.tar.xz
pttbbs-6a459a66d264a1eb8f8f62692ceb48c2ed1c0cf1.tar.zst
pttbbs-6a459a66d264a1eb8f8f62692ceb48c2ed1c0cf1.zip
don't reset random seed for each game.
and don't use very bad random seed git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2457 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/dark.c')
-rw-r--r--mbbsd/dark.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mbbsd/dark.c b/mbbsd/dark.c
index caad835b..1942aa86 100644
--- a/mbbsd/dark.c
+++ b/mbbsd/dark.c
@@ -105,7 +105,6 @@ brd_rand()
bzero(brd, sizeof(brd));
bzero(tem, sizeof(tem));
bzero(&curr, sizeof(curr));
- srand(getpid() % 2731 + now % 3219);
for (y = 0; y < 4; y++)
for (x = 0; x < 8; x++)
while (1) {
@@ -348,7 +347,7 @@ playing(sint fd, sint color, sint ch, sint * b, userinfo_t * uin)
int
main_dark(int fd, userinfo_t * uin)
{
- sint end = 0, ch = 1, go_on, i = 0, cont = 0;
+ sint end = 0, ch = 1, i = 0, cont = 0;
char buf[16];
*buf = 0;
fix = 0;
@@ -450,6 +449,7 @@ main_dark(int fd, userinfo_t * uin)
}
}
if (currutmp->turn == 1) {
+ sint go_on;
if (uin->turn == 'g') {
cont = 1;
uin->turn = (currutmp->turn) ? 0 : 1;