This commit is contained in:
Maciej Caderek
2022-02-17 16:21:01 +01:00
parent 67f52a680d
commit 1bcb481574
9 changed files with 155 additions and 1 deletions

View File

@@ -110,6 +110,15 @@ const main = async () => {
setState({ pgn: "", fen, moves: game.getMoves(), ply: 0, game });
window.location.hash = `v1/fen/${state.fen}`;
await player.load(game);
setState("activeTab", "game");
if (
game.getPosition(0).turn === "b" &&
state.boardConfig.flipped === false
) {
setState("boardConfig", "flipped", true);
board.flip();
}
document.title = `SHORTCASTLE - FEN ${fen}`;
},