[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnugo-devel] != EMPTY or IS_COLOR ?
From: |
Gunnar Farneback |
Subject: |
Re: [gnugo-devel] != EMPTY or IS_COLOR ? |
Date: |
Fri, 12 Oct 2001 08:19:04 +0200 |
User-agent: |
EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/20.7 (sparc-sun-solaris2.7) (with unibyte mode) |
Teun wrote:
> In the days of the 2-D board
> != EMPTY implied BLACK || WHITE.
> With the 1-D board it can also mean GRAY,
> unless you made sure that the point is ON_BOARD.
>
> This patch defines a new macro IS_COLOR and as
> an example replace != EMPTY tests in worm.c
> with IS_COLOR tests. I think this is
> safer in the long run
That's quite possible, but wouldn't IS_STONE be a more intuitive name
for detecting a stone of either color?
/Gunnar