very cool, made it all the way to a checkmate
very cool, made it all the way to a checkmate
[0]: https://stackoverflow.com/questions/417142/what-is-the-maxim...
might more fun too, representing each state of play instead of just the board position.
Also easily compressible if size is an issue: https://mbuffett.com/posts/compressing-chess-moves
Would also mean all rules can be represented, and you'd be able to do cool things like highlight the previous move that was made.
Nice, ok, might try and add this.
It could also be pretty long, 5898 moves to be precise when using the 50-move rule [1].
And it's the right choice, IMO -- if two positions are the same they should have the same URL, regardless of the specific move order used to reach it.
To adhere to that properly, you need to somehow represent all previous positions that could be reached again, and the number of times it has occurred. Of course you can get that by including all the move history, but it's also possible to prune it a lot, like any capture or pawn move can flush the history since no previous position is reachable. But it's still a bit more complicated than just representing the current position.
FEN doesn't account for this, deliberately leaving the history out of scope. It's a matter of preference whether you'd want a tool like this to handle those cases.