Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: calling subroutines

Author: James Robertson

Date: 13:06:42 10/06/98

Go up one level in this thread


On October 06, 1998 at 14:59:18, John Coffey wrote:

>If you were calculating the moves of a white rook, then you could just
>use one table to get the rook moves if  you assume that all pieces can be
>captured, but then bitwise-and it with the
>bit-inverse of the location of the white pieces to get the true rook moves?

Er...... I do something like that, except the other way around. I look up a 64
bit integer that has 0's for all legal moves for the rook (by bitwise-anding a
rank bitmap and a file (rotated 90 degrees) bitmap. Then I bitwise-or it with a
bitmap of friendly pieces (1's represent pieces). Then I not (bit-inverse) the
bitmap, and extract all 1's as moves.

>
>John Coffey



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.