summaryrefslogtreecommitdiffstats
path: root/mbbsd/othello.c
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-03-31 00:50:34 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-03-31 00:50:34 +0800
commit98acb18b8e6b7d7bfdd49809774e61328ef7f7a5 (patch)
treee1f04943a2f84e4755ee13de50aa1f6acde2d951 /mbbsd/othello.c
parenteb94f525ab29b0c82e70fa895d2e343047fefd26 (diff)
downloadpttbbs-98acb18b8e6b7d7bfdd49809774e61328ef7f7a5.tar
pttbbs-98acb18b8e6b7d7bfdd49809774e61328ef7f7a5.tar.gz
pttbbs-98acb18b8e6b7d7bfdd49809774e61328ef7f7a5.tar.bz2
pttbbs-98acb18b8e6b7d7bfdd49809774e61328ef7f7a5.tar.lz
pttbbs-98acb18b8e6b7d7bfdd49809774e61328ef7f7a5.tar.xz
pttbbs-98acb18b8e6b7d7bfdd49809774e61328ef7f7a5.tar.zst
pttbbs-98acb18b8e6b7d7bfdd49809774e61328ef7f7a5.zip
add mmap to cuser get ride of passwd_update
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1640 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/othello.c')
-rw-r--r--mbbsd/othello.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/mbbsd/othello.c b/mbbsd/othello.c
index 96fea2e2..b4625a58 100644
--- a/mbbsd/othello.c
+++ b/mbbsd/othello.c
@@ -95,7 +95,7 @@ printboard()
print_chess(4, 5, BLACK);
print_chess(5, 4, BLACK);
move(3, 56);
- prints("(黑)%s", cuser.userid);
+ prints("(黑)%s", cuser->userid);
move(3, 72);
prints(": 02");
move(4, 56);
@@ -229,7 +229,7 @@ end_of_game(int quit)
fp1 = fopen(SECRET, "a");
if (fp1) {
fprintf(fp1, "%d,%d,%s,%02d,%02d\n", think, which_table,
- cuser.userid, number[0], number[1]);
+ cuser->userid, number[0], number[1]);
fclose(fp1);
}
}
@@ -239,7 +239,7 @@ end_of_game(int quit)
fclose(fp);
return;
}
- fprintf(fp, "在%s級中, %s臨陣脫逃\n", opponent[think], cuser.userid);
+ fprintf(fp, "在%s級中, %s臨陣脫逃\n", opponent[think], cuser->userid);
if (fp)
fclose(fp);
return;
@@ -252,7 +252,7 @@ end_of_game(int quit)
demoney(200);
if (fp)
fprintf(fp, "在%s級中, %s以 %02d:%02d 贏了電腦%02d子\n",
- opponent[think], cuser.userid, number[0], number[1],
+ opponent[think], cuser->userid, number[0], number[1],
number[0] - number[1]);
} else if (number[1] > number[0]) {
prints("電腦贏了你%02d子", number[1] - number[0]);
@@ -260,16 +260,16 @@ end_of_game(int quit)
fprintf(fp, "在%s級中, ", opponent[think]);
if (number[1] - number[0] > 20)
fprintf(fp, "電腦以 %02d:%02d 慘電%s %02d子\n", number[1],
- number[0], cuser.userid, number[1] - number[0]);
+ number[0], cuser->userid, number[1] - number[0]);
else
fprintf(fp, "電腦以 %02d:%02d 贏了%s %02d子\n", number[1],
- number[0], cuser.userid, number[1] - number[0]);
+ number[0], cuser->userid, number[1] - number[0]);
}
} else {
prints("你和電腦打成平手!!");
if (fp)
fprintf(fp, "在%s級中, %s和電腦以 %02d:%02d 打成了平手\n",
- opponent[think], cuser.userid, number[1], number[0]);
+ opponent[think], cuser->userid, number[1], number[0]);
}
if (fp)
fclose(fp);
@@ -394,7 +394,7 @@ report()
else if (nowboard[i][j] == WHITE)
number[1]++;
move(3, 60);
- prints("%s", cuser.userid);
+ prints("%s", cuser->userid);
move(3, 72);
prints(": %02d", number[0]);
move(4, 60);