Commit | Line | Data |
---|---|---|
1 | // Take into account that the move may be a multi-move | |
2 | export function getFullNotation(move, type) { | |
3 | if (!type) type = "notation"; | |
4 | if (Array.isArray(move)) { | |
5 | let notation = ""; | |
6 | for (let i=0; i<move.length; i++) | |
7 | notation += move[i][type] + ","; | |
8 | // Remove last comma: | |
9 | return notation.slice(0,-1); | |
10 | } | |
11 | // Simple (usual) case | |
12 | return move[type]; | |
13 | } |