Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: A question in TSCP source code please?

Author: Uri Blass

Date: 16:41:19 10/19/03

Go up one level in this thread


On October 19, 2003 at 19:29:31, Gopi wrote:

>Thanks very much Uri as it really solved my doubt.And I will be glad if anyone
>can also explain this also.This code comes under gen() function.
>if (side==LIGHT) {
>if(castle&1)
>     gen_push(E1,G1,2);
>if(castle&2)
>     gen_push(E1,C1,2);
>etc...
> In this Why do we do (castle&1),(castle&2) etc...?


castle&1 means that short castle for white is allowed
or may be allowed later(white king and rook h1 did not move)

castle&2 means long castle for white is allowed or may be allowed later.

Uri



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.