Author: Russell Reagan
Date: 10:54:23 03/28/03
Go up one level in this thread
On March 28, 2003 at 06:32:37, Tony Werten wrote: >Wich obviously is wrong. > >BB = BITBOARD > >BB|=((BB & even int32) shr 32) | ((BB & odd int32) shl 32) >BB|=((BB & even int16) shr 16) | ((BB & odd int16) shl 16) >BB|=((BB & even byte) shr 8) | ((BB & odd byte) shl 8) >BB|=((BB & even nibble) shr 4) | ((BB & odd nibble) shl 4) >BB|=((BB & even 2bit) shr 2) | ((BB & odd 2bit) shl 2) >BB|=((BB & even bit) shr 1) | ((BB & odd bit) shl 1) > >BITBOARD=BITBOARD XOR (1 shl(63-lsb(BB))) > > >( I'm not claiming it's efficient ) I'm not exactly sure what some of your code means, like "even int32" and the rest. Is it a bit pattern like "10" for even and "01" for odd? I'm also not sure what the text qualifies as ok or not. For instance, does OR-EQUAL count? I'm not sure. He didn't say. He may have only been talking about a single expression and not multiple ones. Also, can lsb() be written using only the stated operations? In any case, I may have assumed too much from the text. Thanks for challenging it :)
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.