From 86bdba90da39470708f7ec70883b9603b6b2c37d Mon Sep 17 00:00:00 2001 From: scw Date: Wed, 28 Jul 2004 14:14:13 +0000 Subject: Add color for gomo board. (The same way as in GO) git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2148 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- include/gomo.h | 6 +++--- mbbsd/gomo.c | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/include/gomo.h b/include/gomo.h index e2a5a5ca..b1228ba8 100644 --- a/include/gomo.h +++ b/include/gomo.h @@ -1,4 +1,4 @@ -/* $Id: gomo.h,v 1.2 2002/06/04 13:07:12 in2 Exp $ */ +/* $Id$ */ #ifndef _INCLUDE_GOMO_H #define _INCLUDE_GOMO_H @@ -11,8 +11,8 @@ #define BRDSIZ (15) /* ´Ñ½L³æÃä¤j¤p */ #endif -#define BGOTO(x, y) move( 16 - y , x * 2 + 3) -#define BGOTOCUR(x, y) move(16 - y, x * 2 + 4) +#define BGOTO(x, y) move( 16 - (y) , (x) * 2 + 3) +#define BGOTOCUR(x, y) move(16 - (y), (x) * 2 + 4 - 8) /* 0 0 0 = #@# : len= 3 : NO 00 NO diff --git a/mbbsd/gomo.c b/mbbsd/gomo.c index fcfdf4fb..9fbd849b 100644 --- a/mbbsd/gomo.c +++ b/mbbsd/gomo.c @@ -9,6 +9,9 @@ static char ku[BRDSIZ][BRDSIZ]; static Horder_t *v; +#define move(y,x) move(y, (x) + ((y) < 2 || (y) > 16 ? 0 : \ + (x) > 35 ? 11 : 8)) + /* pattern and advance map */ static int @@ -472,6 +475,7 @@ gomoku(int fd) } my->turn = 1; } + redoscr(); continue; } if (my->turn) { @@ -506,6 +510,7 @@ gomoku(int fd) move(15, 40); clrtoeol(); } + redoscr(); } } add_io(0, 0); -- cgit v1.2.3