Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions chess/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3194,7 +3194,7 @@ def variation_san(self, variation: Iterable[Move]) -> str:
"""
Given a sequence of moves, returns a string representing the sequence
in standard algebraic notation (e.g., ``1. e4 e5 2. Nf3 Nc6`` or
``37...Bg6 38. fxg6``).
``37... Bg6 38. fxg6``).

The board will not be modified as a result of calling this.

Expand All @@ -3210,7 +3210,7 @@ def variation_san(self, variation: Iterable[Move]) -> str:
if board.turn == WHITE:
san.append(f"{board.fullmove_number}. {board.san_and_push(move)}")
elif not san:
san.append(f"{board.fullmove_number}...{board.san_and_push(move)}")
san.append(f"{board.fullmove_number}... {board.san_and_push(move)}")
else:
san.append(board.san_and_push(move))

Expand Down
2 changes: 1 addition & 1 deletion test.py
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ def test_variation_san(self):
self.assertEqual(fen, board.fen(), msg="Board unchanged by variation_san")
board.push(chess.Move.from_uci(variation.pop(0)))
var_b = board.variation_san([chess.Move.from_uci(m) for m in variation])
self.assertEqual(("19...Kxh7 20. Qh5+ Kg8 21. Rg3 Bf8 22. Bg5 Re7 "
self.assertEqual(("19... Kxh7 20. Qh5+ Kg8 21. Rg3 Bf8 22. Bg5 Re7 "
"23. Bf6 Nd7 24. Qh6 Nxf6 25. exf6 g6 26. fxe7 Bxe7"),
var_b)

Expand Down
Loading