andrewbackes / chess

Multipurpose chess package for Go/Golang.
21 stars 5 forks source link

Move's algebraic notation #9

Open inmylo opened 7 years ago

inmylo commented 7 years ago

Hi,

I'm trying to use your library, but at the moment I can't find a way to get a move's algebraic notation. For example, if a rook takes another peace - I pass to your library the string g5g6, but then I want to be able to get a string Rxg6. Something like move.San() which returns SAN formatted string. Is it possible?

If not, could you please implement this function? If it's too difficult - how else I can achieve this?

hauva69 commented 6 years ago

Depending on what you need, you might pipe your output to pgn-extract. That's what I do with my own silly little tool, which get's my games from lichess. It knows nothing about chess, it just uses the JSON it gets from the API.

Of course, it's not a real solution, but in some cases, like in mine, it can be bearable workaround.