Author: Miguel A. Ballicora
Date: 08:43:48 01/31/01
Go up one level in this thread
On January 31, 2001 at 10:58:19, Tord Romstad wrote: >On January 30, 2001 at 17:06:20, Miguel A. Ballicora wrote: > >>You have a board of 128 squares rather than 64. It is 16x8, ranks 1-8 but you >>have 16 columns. Of course, the last 8 columns you never use but this array >>is useful to detect when a piece goes out of bounds. >> >>You declare the board like >> >>unsigned char board [128]; >> >>How to detect if a piece is out of the board? >>For instance, when you check all the squares that a bishop can go, >>in one direction you loop doing square = square + 9; > >You probably mean 17, not 9. Remember that there are 16 bytes on each rank! Of course! my mistake. Regards, Miguel >Tord
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.