Closed latenitecoding closed 7 months ago
I didn't update this branch, but I was able to get drawing to work on an initial board state. I modified getCurrentMove to create a default 'root' move if one did not exist. This root move is saved and can be used by displayMove but is never passed to the PGN and is filtered out of all move calls to the chess API. If you save, the shapes are saved too, so they will still be there when you load the board later.
I also uncovered a bug in this process that prevents you from returning to the initial board state by navigating backwards through the move history. I fixed that bug. That fix will also display the shapes that you've drafted or saved to the initial board state too.
I'll make another PR for that once we get these other PRs in.
This the separate PR for #7 . Handles all of the cases with white or black starting for both the main line and variant moves. It also add FEN export.
Dependent on PR #10