Author: Edward Seid
Date: 06:49:28 10/30/03
I'm trying to understand 0x88 board representation. My reference is Bruce Moreland's page at http://www.seanet.com/~brucemo/topics/0x88.htm Note that I'm not a C programmer, so please explain in generic coding terms. I've figured out that (index & &H88) is used to determine if the square is on the board. The square is off the board if (index & &H88) = &H08, &H80 or &H88. My question is... is there a quick way to determine if (index & &H88) is equal to any of those 3 numbers? Since I'm programming in Visual Basic, the best that I've come up with is: mask = index And &H88 If (mask = &H08) Or (mask = &H80) Or (mask = &H88) Then ' square is off board Else ' square is on board End If I thought there was a shortcut way. Visual Basic doesn't have bitshift operators, in case that's required. Thanks in advance.
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.