Computer Chess Club Archives




Subject: Re: Idea for check function

Author: Tony Werten

Date: 22:59:15 11/14/02

Go up one level in this thread

On November 14, 2002 at 23:00:20, Zach Wegner wrote:

>On November 14, 2002 at 22:38:16, Andrew Dados wrote:
>>yes, en passant
>That could be easily overcome. My move struct has bits set for all the types of
>moves, so it could check ep +- 16, depending on side. I also just thought of
>castling, but it could check the rook to square also. This is a lot of tests,
>but I think it would still be much faster.

I think it is. In my program I check for special moves (ep and castle) and do a
full (slow) checkdetection else I do the fast one.

You can also use this for your own checkdetection (after your own move). If
not(special_move) and ( I wasn't in check to start with ) do fast checkdetection
else do slow one.


This page took 0.01 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.