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:
Marco Costalba
2010-07-23 10:38:19 +02:00
parent 098ac5e44e
commit 839088205e
4 changed files with 146 additions and 112 deletions
+1
View File
@@ -294,6 +294,7 @@ private:
void put_piece(Piece p, Square s);
void allow_oo(Color c);
void allow_ooo(Color c);
bool set_castling_rights(char token);
// Helper functions for doing and undoing moves
void do_capture_move(Key& key, PieceType capture, Color them, Square to, bool ep);