Greatly simplify castling rights handling

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2011-06-27 16:06:15 +01:00
parent c9b24c3358
commit c2a4856f9e
4 changed files with 62 additions and 116 deletions

View File

@@ -322,16 +322,16 @@ namespace {
result ^= ZobPiece[PieceOfs[pos.piece_on(s)] + s];
}
if (pos.can_castle_kingside(WHITE))
if (pos.can_castle(WHITE_OO))
result ^= ZobCastle[0];
if (pos.can_castle_queenside(WHITE))
if (pos.can_castle(WHITE_OOO))
result ^= ZobCastle[1];
if (pos.can_castle_kingside(BLACK))
if (pos.can_castle(BLACK_OO))
result ^= ZobCastle[2];
if (pos.can_castle_queenside(BLACK))
if (pos.can_castle(BLACK_OOO))
result ^= ZobCastle[3];
if (pos.ep_square() != SQ_NONE)