Closed purefan closed 3 years ago
Yes, after parsing pgn.history.moves
is an array, where every move has an attribute fen
, like this:
const gamePgn = `[SetUp "1"]
[FEN "4k3/pppppppp/8/8/8/8/PPPPPPPP/4K3 w - - 0 1"]
1. e4`
const pgn = new Pgn(gamePgn)
Assert.equals(pgn.history.moves[0].fen, "4k3/pppppppp/8/8/4P3/8/PPPP1PPP/4K3 b - e3 0 1")
say I want to know the fen after e4 e5 Nf3, is there a way to do this with cm-pgn?