jordanbray / chess

A rust library to manage chess move generation
https://jordanbray.github.io/chess/
MIT License
245 stars 57 forks source link

Promotion moves not implemented in ChessMove::from_san #80

Open Gourab-Ghosh opened 1 year ago

Gourab-Ghosh commented 1 year ago

Promotion moves not implemented in ChessMove::from_san. In position 8/7P/2p5/p1n2k2/6R1/5P2/p6K/2r5 w - - 0 1 calling the function ChessMove::from_san(board, "h8=Q") panics.

kesslwovv commented 1 year ago

Promotions are supported, just without the equal sign. ChessMove::from_san(board, "h8Q") will work. My workaround was to remove all "=" before calling from_san.