Do not manually build endgame functions hash keys

Use Position::compute_material_key() to do the job,
so we are sure there is not key mismatch during
endgame function lookups.

This fixes two endgames hash errors that caused two
endgames to be disabled.

This patch is also a code cleanup because removes a lot
of messy key assignments.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2009-02-13 10:00:47 +01:00
parent 67375f4693
commit 30e8f0c9ad
2 changed files with 58 additions and 42 deletions

View File

@@ -118,7 +118,7 @@ void Position::from_fen(const std::string& fen) {
}
sideToMove = (fen[i] == 'w' ? WHITE : BLACK);
// Castling rights:
// Castling rights
i++;
if (fen[i] != ' ')
{