From 4ba1777ffaa8cacae3651c0082f538c92b3a9bbb Mon Sep 17 00:00:00 2001 From: scw Date: Sat, 28 Jun 2008 15:12:01 +0000 Subject: =?UTF-8?q?Gomoku=20rule=20fix:=20lifting=20a=20ban=20by=20another?= =?UTF-8?q?=20ban=20(=E4=BB=A5=E7=A6=81=E8=A7=A3=E7=A6=81)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4383 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/gomo.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mbbsd/gomo.c b/mbbsd/gomo.c index 5507913f..d68a61eb 100644 --- a/mbbsd/gomo.c +++ b/mbbsd/gomo.c @@ -159,8 +159,10 @@ dirchk(board_t ku, int x, int y, int color, int limit, int dx, int dy) nx = x + (le > ri ? 1 : -1) * tmp * dx; ny = y + (le > ri ? 1 : -1) * tmp * dy; - if ((dirchk(ku, nx, ny, color, 0, dx, dy) == 0x06) && - (chkwin(getstyle(ku, nx, ny, color, limit), limit) >= 0)) + if ((dirchk(ku, nx, ny, color, limit, dx, dy) == 0x06) && + (chkwin( + getstyle(ku, nx, ny, color, limit), + limit) != CHESS_RESULT_LOST)) break; } } -- cgit v1.2.3