[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnugo-devel] changed genmove() interface
From: |
Heikki Levanto |
Subject: |
Re: [gnugo-devel] changed genmove() interface |
Date: |
Fri, 5 Nov 2004 08:46:36 +0100 |
User-agent: |
Mutt/1.5.6+20040722i |
On Fri, Nov 05, 2004 at 03:02:18AM +0100, Gunnar Farneb?ck wrote:
>
> float value;
> int resign;
> int move = genmove(color, &value, &resign);
>
> with the following semantics:
>
> 1. The recommended move is returned by the function. Check
> move == PASS_MOVE to determine if genmove() wants to pass.
> 2. Value is the internal value of the move. Don't test this value for
> anything. It is only useful for debug output and in some contexts
> for comparison against other move values. Pass a NULL pointer if
> you don't care about the move value.
> 3. To determine whether genmove() wants to resign, check if 'resign'
> is true. Pass a NULL pointer if you don't care.
Since we have PASS_MOVE, why not have a RESIGN_MOVE as well? That would
save a parameter here, and probably many other places as well, and be
more consistent.
--
Heikki Levanto "In Murphy We Turst" heikki (at) lsd (dot) dk