[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnugo-devel] != EMPTY or IS_COLOR ?
From: |
Teun Burgers |
Subject: |
Re: [gnugo-devel] != EMPTY or IS_COLOR ? |
Date: |
Sat, 13 Oct 2001 12:19:13 +0200 |
Teun Burgers wrote:
> This patch rename IS_COLOR to IS_STONE and uses it at
> quite a few more places.
This patch undoes a few of these changes in board.c
on komaster arguments. != EMPTY can intend gray
there I think.
I think the remaining ones refer to board positions
and are OK.
Teun
Index: board.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/board.c,v
retrieving revision 1.15
diff -u -r1.15 board.c
--- board.c 2001/10/12 20:35:25 1.15
+++ board.c 2001/10/13 10:15:37
@@ -380,7 +380,7 @@
if (sgf_dumptree) {
char buf[100];
if (str == 0) {
- if (IS_STONE(komaster))
+ if (komaster != EMPTY)
gg_snprintf(buf, 100, "%s (variation %d, hash %lx, komaster %s:%s)",
message, count_variations, hashdata.hashval,
color_to_string(komaster),
@@ -390,7 +390,7 @@
message, count_variations, hashdata.hashval);
}
else {
- if (IS_STONE(komaster))
+ if (komaster != EMPTY)
gg_snprintf(buf, 100, "%s at %s (variation %d, hash %lx, komaster
%s:%s)",
message, location_to_string(str), count_variations,
hashdata.hashval, color_to_string(komaster),
@@ -434,7 +434,7 @@
char buf[100];
if (!message)
message = "???";
- if (IS_STONE(komaster))
+ if (komaster != EMPTY)
gg_snprintf(buf, 100, "tryko: %s (variation %d, %lx, komaster %s:%s)",
message, count_variations, hashdata.hashval,
color_to_string(komaster), location_to_string(kom_pos));
@@ -908,7 +908,7 @@
* there is suicide. If komaster == GRAY we don't remember who
* owns the ko so we have to try both colors.
*/
- if (IS_STONE(komaster)
+ if (komaster != EMPTY
&& (IS_STONE(board[kom_pos])
|| (komaster != GRAY
&& !is_ko(kom_pos, OTHER_COLOR(komaster), NULL)
@@ -1024,7 +1024,7 @@
return 1;
/* Conditional ko captures are only allowed if the komaster is EMPTY. */
- if (!consider_conditional_ko || IS_STONE(komaster))
+ if (!consider_conditional_ko || komaster != EMPTY)
return 0;
if (tryko(pos, color, message, komaster, kom_pos)) {