SindreSvendby / pgnToFen

Takes PGN as input and returns FEN
MIT License
30 stars 10 forks source link

Issue converting multiple PGN to FEN #9

Closed Chaaronn closed 1 year ago

Chaaronn commented 2 years ago

I know this is an old lib, I've just started using it to create a chess engine that plays unseen moves from the opponent.

I've got an issue with pgnFile() giving me the same FEN for every game. Here's my code.

The output I'm getting is this. The FEN list contains the same game each time.

If you feel like picking up an old project and helping me out I'd appreciate it. :)

abhinav7sinha commented 1 year ago

@Chaaronn I can take a look. Do you mind sharing a link to your PGN files?

Chaaronn commented 1 year ago

here you go, this is modified from my set with the top 3 from the troll masters set on the repo as I thought it could be a formatting issue.

abhinav7sinha commented 1 year ago

I get a 404 when I click on it - is it a private repo?

Chaaronn commented 1 year ago

I viewed it in a private tab, but I'll change it to public now

On Wed, 21 Sept 2022, 00:05 Abhinav Sinha, @.***> wrote:

I get a 404 when I click on it - is it a private repo?

— Reply to this email directly, view it on GitHub https://github.com/SindreSvendby/pgnToFen/issues/9#issuecomment-1253002461, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMGNIGKFCH624XHXZHD3ETV7I7KPANCNFSM56XTSRMA . You are receiving this because you were mentioned.Message ID: @.***>

abhinav7sinha commented 1 year ago

Thanks - I'll take a look - later tonight and get back.

abhinav7sinha commented 1 year ago

Hey @Chaaronn - The issue was with the global class variables not being defined inside of constructors. I've fixed it - and opened a PR. Until it's merged - you can use my fork from here - https://github.com/abhinav7sinha/pgnToFen/tree/issue-9-multiple-pgn And sorry about the delay.

SindreSvendby commented 1 year ago

Merged in to master now @Chaaronn.

Thanks for your contribution @abhinav7sinha

Chaaronn commented 1 year ago

Thank you mate! It's for a uni project so I appreciate it