Attempt to clarify installation instructions a little
[vchess.git] / src / utils / notation.js
... / ...
CommitLineData
1// Take into account that the move may be a multi-move
2export 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}