What is it 12x16?Zach Wegner wrote:Personally I think traditional 0x88 is obsolete. You must test the square number first in order to see if its on the board, but you are in most cases going to access the contents of the square anyway to see if the square is empty. If I was going to do a mailbox approach, I'd do 12x16.
I use 0x88 but such way that I have guards (guard pieces) in front as well as next the board array as well between the files of the board, like this:
Code: Select all
board visualisation (x is a guard piece):
xxA8xB8xOxOxOxOxOxH8xx
xxA7xB7xOxOxOxOxOx Oxx
xxA6xB6xOxOxOxOxOx Oxx
xxA5xB5xOxOxOxOxOx Oxx
xxA4xB4xOxOxOxOxOx Oxx
xxA3xB3xOxOxOxOxOx Oxx
xxA2xB2xOxOxOxOxOx Oxx
xxA1xB1xOxOxOxOxOxH1xx
which gets stored in memory:
xxxxxxxxxxxxxxxxA1A2A3A4A5A6A7A8xxxxxxxxB1-B8 ........... xxxxxxxxH1-H8xxxxxxxxxxxxxxx
Isn't it a common practice?
Filip