Fix Eightpieces, add some simple variants, add a basic variants classification instea...
[vchess.git] / client / src / utils / notation.js
index 4402e26..3d566c8 100644 (file)
@@ -2,11 +2,15 @@
 export function getFullNotation(move, type) {
   if (!type) type = "notation";
   if (Array.isArray(move)) {
-    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 "&#8734;";
   }
   // Simple (usual) case
   return move[type];