One other remark:Gerd Isenberg wrote:Your code is somehow hard to read at the first glance. Do you mean that?Code: Select all
revMovesAndCastlRights += 256; revMovesAndCastlRights &= (int) ( (char) (spoiler[piece] + 64) & spoiler[victim] );
I did not include the increment of the move counter in my first code snippet because it is best done in another place (outside the move loop):
Code: Select all
Search(int revMovesAndCastlRights)
{
revMovesAndCastlRights += 256;
for(ALL_MOVES)
{
Make();
Search(revMovesAndCastlRights & ( (char) (spoiler[piece]+64)) & spoiler[victim]);
UnMake();
}
}