Attempt to clarify installation instructions a little
[vchess.git] / client / src / utils / notation.js
CommitLineData
e71161fb 1// Take into account that the move may be a multi-move
2c5d7b20
BA
2export function getFullNotation(move, type) {
3 if (!type) type = "notation";
e71161fb 4 if (Array.isArray(move)) {
737a5daf
BA
5 if (move.length <= 3) {
6 let notation = "";
7 for (let i=0; i<move.length; i++)
8 notation += move[i][type] + ",";
9 // Remove last comma:
10 return notation.slice(0,-1);
11 }
12 // Four sub-moves or more:
13 return "&#8734;";
e71161fb
BA
14 }
15 // Simple (usual) case
2c5d7b20 16 return move[type];
e71161fb 17}