normalize solution move in puzzle UI to fix castling bug

opening-wiki
Thibault Duplessis 2021-10-06 08:37:52 +02:00
parent 910e64b798
commit 463e5fc315
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ export function mergeSolution(root: TreeWrapper, initialPath: Tree.Path, solutio
const pos = Chess.fromSetup(parseFen(initialNode.fen).unwrap()).unwrap();
const fromPly = initialNode.ply;
const nodes = solution.map((uci, i) => {
const move = parseUci(uci)!;
const move = pos.normalizeMove(parseUci(uci)!);
const san = makeSan(pos, move);
pos.play(move);
const node = makeNode(pos, move, fromPly + i + 1, san);