Bert, I am not familiar with ghost fields and couldn't find anything with Google. Here's what I tried to reconstruct from your message.BertTuyt wrote:
Moving upwards for white is only shifting bits 5 or 6 places (i think everyone is familiar with ghost fields, so moving a man always uses the same number of fields, which is not the case on a normal board!).
So generating a bitboard with all possible moves for white in 1 direction is something like :
( bbEmpty<<5 ) & bbWhiteMan
The natural mapping of squares to bits would be something like this (so that a piece on square 1 is on the least significant bit)
Code: Select all
{
00, 01, 02, 03, 04,
05, 06, 07, 08, 09,
10, 11, 12, 13, 14,
15, 16, 17, 18, 19,
20, 21, 22, 23, 24,
25, 26, 27, 28, 29,
30, 31, 32, 33, 34,
35, 36, 37, 38, 39,
40, 41, 42, 43, 44,
45, 46, 47, 48, 49
}
Do you use instead the mapping
Code: Select all
{
00, 01, 02, 03, 04,
05, 06, 07, 08, 09,
11, 12, 13, 14, 15,
16, 17, 18, 19, 20,
22, 23, 24, 25, 26,
27, 28, 29, 30, 31,
33, 34, 35, 36, 37,
38, 39, 40, 41, 42,
44, 45, 46, 47, 48,
49, 50, 51, 52, 53
}
Rein
EDIT: the forum killed all the spaces in my layout!
Code: Select all