chess icon indicating copy to clipboard operation
chess copied to clipboard

feat: a to san function

Open samyosm opened this issue 1 year ago • 2 comments

I would love a function that would transform a ChessMove into a SAN notation instead of the currently available LAN notation. E.g. a3 instead of a2a3 in the default position.

samyosm avatar May 12 '23 02:05 samyosm

Ditto, I came to the repo to make this suggestion as well (also happy to help out via a PR)

xd009642 avatar Aug 08 '23 08:08 xd009642

Hello, this is a duplicate of #69.

I actually submitted a PR and it works well, I've been using it for my project with no issue: #71 .

@jordanbray is not actively maintaining this crate. It's a shame, because I like the way it's thought out. The name chess is also, I think, a big advantage.

If you want to use this, I maintain my fork with the mentioned PR included: https://github.com/yzoug/chess. If you use my fork the Game struct can be obtained as a PGN (i.e. SAN notation, think "1. e4 e5 2. Nf3 Ng6...") with .to_string() (it implements the Display trait).

I also think we should probably fork this under a new name and gather motivated people to maintain it. I'm a not a good Rust dev so I don't think I can assume this role, but would be happy to help.

yzoug avatar Feb 17 '24 23:02 yzoug