Computer Chess Club Archives


Search

Terms

Messages

Subject: Idea for check function

Author: Zach Wegner

Date: 19:26:28 11/14/02


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?



This page took 0.05 seconds to execute

Last modified: Thu, 07 Jul 11 08:48:38 -0700

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