Add Forward + Doubleorda variants
[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
BA
4 if (Array.isArray(move)) {
5 let notation = "";
6 for (let i=0; i<move.length; i++)
2c5d7b20 7 notation += move[i][type] + ",";
e71161fb
BA
8 // Remove last comma:
9 return notation.slice(0,-1);
10 }
11 // Simple (usual) case
2c5d7b20 12 return move[type];
e71161fb 13}