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

Missing move number on pgn with black to move #37

Closed
LocutusOfPenguin opened this issue Jun 28, 2015 · 1 comment
Closed

Missing move number on pgn with black to move #37

LocutusOfPenguin opened this issue Jun 28, 2015 · 1 comment

Comments

@LocutusOfPenguin
Copy link

Hello,
on picochess we just had this problem. I prepared a small script for proof.
game1 print is wrong. Can you check please?

Here the code:

import chess
import chess.pgn

b_move = chess.Move(chess.E6, chess.D6)
w_move = chess.Move(chess.E3, chess.D4)

# wrong display when black to move - "1." missing
game1 = chess.pgn.Game()
game1.setup('8/8/4k3/8/4P3/4K3/8/8 b - - 0 1')
node = game1
node = node.add_main_variation(b_move)
node = node.add_main_variation(w_move)
print(game1)

# proof, with white to move, no problem
game2 = chess.pgn.Game()
game2.setup('8/8/4k3/8/4P3/4K3/8/8 w - - 0 1')
node = game2
node = node.add_main_variation(w_move)
node = node.add_main_variation(b_move)
print(game2)
@niklasf
Copy link
Owner

niklasf commented Jun 28, 2015

Good find! I can confirm this and will fix it, tonight.

niklasf added a commit that referenced this issue Jun 28, 2015
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