Saving state - unstable
[vchess.git] / public / javascripts / components / game.js
index 74092b5..5ad33d0 100644 (file)
@@ -574,7 +574,7 @@ Vue.component('my-game', {
                        this.newGame("computer");
                },
                newGame: function(mode, fenInit, color, oppId, moves, continuation) {
-                       const fen = fenInit || VariantRules.GenRandInitFen();
+                       const fen = "rbnqknbr/pppppppp/8/8/8/8/PPPPPPPP/BQRKNNRB 1111";//fenInit || VariantRules.GenRandInitFen();
                        console.log(fen); //DEBUG
                        this.score = "*";
                        if (mode=="human" && !oppId)
@@ -672,9 +672,10 @@ Vue.component('my-game', {
                                this.selectedPiece.style.display = "inline-block";
                                this.selectedPiece.style.zIndex = 3000;
                                let startSquare = this.getSquareFromId(e.target.parentNode.id);
-                               this.possibleMoves = this.mode!="idle" && this.vr.canIplay(this.mycolor,startSquare)
+                               this.possibleMoves = true //this.mode!="idle" && this.vr.canIplay(this.mycolor,startSquare)
                                        ? this.vr.getPossibleMovesFrom(startSquare)
                                        : [];
+                               console.log(this.possibleMoves);
                                e.target.parentNode.appendChild(this.selectedPiece);
                        }
                },