Add Ambiguous. Fix a few issues with FEN generation / options
[xogo.git] / app.js
diff --git a/app.js b/app.js
index 7d387c5..4c0b5e4 100644 (file)
--- a/app.js
+++ b/app.js
@@ -545,8 +545,9 @@ function initializeGame(obj) {
         break;
       }
     }
-    fillGameInfos(obj, playerColor == "w" ? 1 : 0);
-    if (obj.randvar)
+    const playerIndex = (playerColor == "w" ? 0 : 1);
+    fillGameInfos(obj, 1 - playerIndex);
+    if (obj.players[playerIndex].randvar)
       toggleVisible("gameInfos");
     else
       toggleVisible("boardContainer");