0

I am trying to change the notation of the moves, I mean the library returns for example g1f3 and I want to change to Nf3 (algebraic notation). I try this method but it doesn't work:

board.parse_san(move.move)

How can I do it? There is any method in the library?

Michael
  • 19
  • 4

1 Answers1

4

https://python-chess.readthedocs.io/en/latest/core.html#chess.Board.san

Here, you can see that given a board: chess.Board and a move: chess.Move, you can get the SAN representation of your move using board.san(move), returning a str.

LittleCoder
  • 391
  • 1
  • 13