Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Bug in Bruja/Simon

Author: Dann Corbit

Date: 12:45:48 06/15/05

Go up one level in this thread


On June 15, 2005 at 15:26:17, Dan Honeycutt wrote:
[snip]
>Does this look right:
>
>int CanWin() {
>  int can_win = 0;
>  if (w_pawns || w_queens || w_rooks ||
>    ((w_bishops + w_knights) > 1)) can_win |= 1;
>  if (b_pawns || b_queens || b_rooks ||
>    ((b_bishops + b_knights) > 1)) can_win |= 2;
>  return can_win;
>}

It might return a false positive (e.g. two same square-color bishops) but that
should not be a problem.  A false negative (e.g. two knights for one side
actually can win) is far worse.



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.