【发布时间】:2021-01-17 10:07:10
【问题描述】:
这里我们成功解析了一个PGN游戏:
import chess, chess.svg, chess.pgn, io
game = chess.pgn.read_game(io.StringIO("1. e4 e5 2. Nf3 *"))
print(game)
很遗憾,board() 仍然是初始位置。如何获得最终位置?
print(game.board())
# r n b q k b n r
# p p p p p p p p
# . . . . . . . .
# . . . . . . . .
# . . . . . . . .
# . . . . . . . .
# P P P P P P P P
# R N B Q K B N R
【问题讨论】:
标签: python chess python-chess