Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Idea for check function

Author: Andrew Dados

Date: 19:38:16 11/14/02

Go up one level in this thread


On November 14, 2002 at 22:26:28, Zach Wegner wrote:

>I was thinking one day when i had free time about how to speed up my engine a
>little. I thought of an idea for my check() function, and i was wondering if
>this would work properly. In the function, it would check the to and from
>squares of the last move made, determine the position of the squares relative
>the king (this uses 0x88), and check if a)the piece moved could attack from the
>to square, or b)find a piece on the ray of the from square and see if it attacks
>the king. This would only be used if we werent seeing if a king move would be
>legal. So, are there any types of moves that would cause this to fail?

yes, en passant



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