Author: Sune Fischer
Date: 07:48:35 02/17/04
Go up one level in this thread
On February 16, 2004 at 22:41:00, Robert Hyatt wrote: >This will make bitmaps insanely difficult to visualize. Remember that bit 0 is >the LSB (or rightmost bit). That means your chess board is going to look like >this when you display a bitboard as a hex number: > > > > h1 g1 f1 e1 d1 c1 b1 a1 > >Because the rightmost 8 bits would be displayed in that order. Correct. > That could drive >someone to drink drain cleaner. I might be more tempted to make bit 0 either >square h8, or h1 instead, so that things are not impossible to debug... Why on earth would you want to do something horrible like that? >It would work as a1 of course, but it would take some thinking when working with >the hex masks... The idea is that you get the first square to be the first bit and the last square to be the last bit. This way you have the easy transformation: square_mask = 1<<square. >My main goal is to just invert my numbering scheme, so that bit 0 becomes bit >63, and so forth, to get rid of the subtract everywhere... Not to mention >needing an extra register regularly... What subtraction, what register? -S.
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.