Computer Chess Club Archives


Search

Terms

Messages

Subject: Just what I needed! Thanks!

Author: Steve Maughan

Date: 12:53:32 10/01/01

Go up one level in this thread


Bob,

>I catch all such things, but in an easy fashion.  I have a single bitmap
>that gives _all_ direct attacks to the target, irregardless of whether the
>piece is black or white.  When a piece is "used" I remove it, then look behind
>it (down the rank/file/diagonal going away from the target square through the
>square occupied by the piece just "used" to see if I find the right kind of
>piece behind that one (IE down a diagonal if the next piece is a bishop or
>queen of either color then attacks bitmap is updated.)  I later notice this
>is a piece of color "x" when I use the attacks bitmap to find the smallest
>piece of "side" that is attacking the destination.

Thanks!!  That was the insight I needed.  I was struggling with the ordering of
the moves when there was an xray attack.  Your way does this dynamically and
with low overhead.

Cheers,

Steve



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.