mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 08:36:33 +08:00
Rewrite Position::from_fen()
Complete rewrite the function and extend compatibility also to X-FEN notation for Chess960. We are now able to read standard FEN, Shredder-FEN and X-FEN. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -404,7 +404,7 @@ Key EndgameFunctions::buildKey(const string& keyCode) {
|
||||
|
||||
s << char(upcase ? toupper(keyCode[i]) : tolower(keyCode[i]));
|
||||
}
|
||||
s << 8 - keyCode.length() << "/8/8/8/8/8/8/8 w -";
|
||||
s << 8 - keyCode.length() << "/8/8/8/8/8/8/8 w - -";
|
||||
return Position(s.str(), 0).get_material_key();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user