- const lineParts = lines[idx].split(" ");
- const startEnd = lineParts[1].split('.');
- let move = {};
- if (startEnd[0] != "-") move.start = V.SquareToCoords(startEnd[0]);
- if (startEnd[1] != "-") move.end = V.SquareToCoords(startEnd[1]);
- const appearVanish = lineParts[2].split('/').map(lpart => {
- if (lpart == "-") return [];
- return lpart.split('.').map(psq => {
- const xy = V.SquareToCoords(psq.substr(2));
- return {
- x: xy.x,
- y: xy.y,
- c: psq[0],
- p: psq[1]
- };
+ const spaceIdx = lines[idx].indexOf(' ');
+ const skipMoveNum = lines[idx].substr(spaceIdx + 1);
+ const lineParts = skipMoveNum.split(",");
+ let move = [];
+ lineParts.forEach(lpart => {
+ const smParts = lpart.split(' ');
+ const startEnd = smParts[0].split('.');
+ let sm = {};
+ sm.start =
+ startEnd[0] != "-"
+ ? V.SquareToCoords(startEnd[0])
+ : { x: -1, y: -1 };
+ sm.end =
+ startEnd[1] != "-"
+ ? V.SquareToCoords(startEnd[1])
+ : { x: -1, y: -1 };
+ const appearVanish = smParts[1].split('/').map(av => {
+ if (av == "-") return [];
+ return av.split('.').map(psq => {
+ const xy = V.SquareToCoords(psq.substr(2));
+ return {
+ x: xy.x,
+ y: xy.y,
+ c: psq[0],
+ p: psq[1]
+ };
+ });