- initVariables(fen)
- {
- super.initVariables(fen);
- // Decode last non-capturing checkered move (if any)
- // TODO: since now we store moves list, this can disappear
- const cmove = fen.split(" ")[4];
- if (cmove != "-")
- {
- const piece = cmove.charAt(0);
- const startEnd = cmove.substr(1).split(";");
- const start = startEnd[0].split(",");
- const end = startEnd[1].split(",");
- this.moves.push(new Move({
- appear: [ new PiPo({c:"c", p:piece, x:end[0], y:end[1]}) ],
- vanish: [ new PiPo({c:"c", p:piece, x:start[0], y:start[1]}) ]
- }));
- }
- }
-