summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-07-28 22:33:14 +0800
committerscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-07-28 22:33:14 +0800
commita035b16261c3df5adbf6520ac8c848064243dbc7 (patch)
tree66894526831072e150d86e60eb8d7aa7319d28e2
parent758b693a6d2c00ba208b1fc8062e51b3b0564ffd (diff)
downloadpttbbs-a035b16261c3df5adbf6520ac8c848064243dbc7.tar
pttbbs-a035b16261c3df5adbf6520ac8c848064243dbc7.tar.gz
pttbbs-a035b16261c3df5adbf6520ac8c848064243dbc7.tar.bz2
pttbbs-a035b16261c3df5adbf6520ac8c848064243dbc7.tar.lz
pttbbs-a035b16261c3df5adbf6520ac8c848064243dbc7.tar.xz
pttbbs-a035b16261c3df5adbf6520ac8c848064243dbc7.tar.zst
pttbbs-a035b16261c3df5adbf6520ac8c848064243dbc7.zip
Fix screen for gomo.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2150 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/gomo.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/mbbsd/gomo.c b/mbbsd/gomo.c
index 8d98c660..00db2282 100644
--- a/mbbsd/gomo.c
+++ b/mbbsd/gomo.c
@@ -298,6 +298,7 @@ gomoku(int fd)
int hewantpass, iwantpass;
userinfo_t *my = currutmp;
Horder_t pool[BRDSIZ*BRDSIZ];
+ int scr_need_redraw = 1;
HO_init(pool);
me = !(my->turn) + 1;
@@ -357,8 +358,12 @@ gomoku(int fd)
prints("%s時間還剩%d:%02d\n", my->turn ? "你的" : "對方",
MAX_TIME / 60, MAX_TIME % 60);
for (;;) {
- move(13, 40);
- outs(my->turn ? "輪到自己下了!" : "等待對方下子..");
+ if (scr_need_redraw){
+ move(13, 40);
+ outs(my->turn ? "輪到自己下了!" : "等待對方下子..");
+ redoscr();
+ scr_need_redraw = 0;
+ }
if (lastcount != tick - now) {
lastcount = tick - now;
move(18, 40);
@@ -408,7 +413,7 @@ gomoku(int fd)
HO_undo(&mv);
tick = mylasttick;
my->turn = 1;
- redoscr();
+ scr_need_redraw = 1;
continue;
} else
break;
@@ -469,7 +474,7 @@ gomoku(int fd)
tick = hislasttick;
HO_undo(&mv);
my->turn = 0;
- redoscr();
+ scr_need_redraw = 1;
continue;
}
if (!my->turn) {
@@ -496,7 +501,7 @@ gomoku(int fd)
}
my->turn = 1;
}
- redoscr();
+ scr_need_redraw = 1;
continue;
}
if (my->turn) {
@@ -531,7 +536,7 @@ gomoku(int fd)
move(15, 40);
clrtoeol();
}
- redoscr();
+ scr_need_redraw = 1;
}
}
add_io(0, 0);