Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong order of segments #6

Open
tsoj opened this issue Jul 8, 2019 · 2 comments
Open

wrong order of segments #6

tsoj opened this issue Jul 8, 2019 · 2 comments

Comments

@tsoj
Copy link

tsoj commented Jul 8, 2019

enpassant field needs to be behind the castling availability.
for me this worked:

def getFullFen(self):
        return self.getFen() + ' ' + ('w ' if self.whiteToMove else 'b ') + (self.castlingRights if self.castlingRights else '-') + ' ' + self.enpassant
@scubaguy
Copy link

scubaguy commented Sep 8, 2020

FENS notation is 6 fields. See https://en.wikipedia.org/wiki/Forsyth%E2%80%93Edwards_Notation
Proposed code mod to fix the output, and new counters to the class for half move clock and full move number.

@tsoj
Copy link
Author

tsoj commented Sep 9, 2020

I would suggest using python chess which supports easy pgn parsing. It seems like this library isn't maintained anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants