bhlangonijr / chesslib

chess library for legal move generation, FEN/PGN parsing and more
Apache License 2.0
225 stars 78 forks source link

MoveConversionException Illegal move while the match is legal? #9

Closed henkvo closed 5 years ago

henkvo commented 5 years ago

Hi all, Some matches give the following MoveConversionException while the matches played are legal themselves. The following example: com.github.bhlangonijr.chesslib.move.MoveConversionException: Couldn't parse SAN to MoveList: Illegal move: e1g1 [O-O] on r3k2r/p3p1bp/2p3p1/1p6/3Pp3/1Qn1P2P/3N1PPB/q2BK2R w kq - 2 23 at com.github.bhlangonijr.chesslib.move.MoveList.addSanMove(MoveList.java:496) at com.github.bhlangonijr.chesslib.move.MoveList.addSanMove(MoveList.java:468) at com.github.bhlangonijr.chesslib.move.MoveList.loadFromSan(MoveList.java:528) at com.github.bhlangonijr.chesslib.game.Game.loadMoveText(Game.java:872) at com.github.bhlangonijr.chesslib.game.Game.loadMoveText(Game.java:694) at nl.overbeek.chessbuilder.EntryPoint.main(EntryPoint.java:23) Any glue? Kind regards Henk illegalMove2.txt illegalMove3.txt illegalMove.txt

bhlangonijr commented 5 years ago

Hello @henkvo, This is something related to the state of castle rights during the process of the PGN file. I am fixing it and will do a new release.

bhlangonijr commented 5 years ago

Hello @henkvo, it should be fixed in version 1.1.7