- let notation = "";
- for (let i=0; i<move.length; i++)
- notation += move[i][type] + ",";
- // Remove last comma:
- return notation.slice(0,-1);
+ if (move.length <= 3) {
+ let notation = "";
+ for (let i=0; i<move.length; i++)
+ notation += move[i][type] + ",";
+ // Remove last comma:
+ return notation.slice(0,-1);
+ }
+ // Four sub-moves or more:
+ return "∞";