this.newGame("computer");
},
newGame: function(mode, fenInit, color, oppId, moves, continuation) {
+ //const fen = "bbrkqnrn/pppppppp/8/8/8/8/PPPPPPPP/NNRKQBBR 1111";
+ //const fen = "bbrkqnr1/pppppp1p/6o1/6s1/3SS3/8/PPP2PPP/NNRKQBBR 1111"; //first 2 moves == pb
const fen = fenInit || VariantRules.GenRandInitFen();
console.log(fen); //DEBUG
this.score = "*";
}
else //against computer
{
+ //this.mycolor = "w";
this.mycolor = Math.random() < 0.5 ? 'w' : 'b';
if (this.mycolor == 'b')
setTimeout(this.playComputerMove, 500);
this.possibleMoves = this.mode!="idle" && this.vr.canIplay(this.mycolor,startSquare)
? this.vr.getPossibleMovesFrom(startSquare)
: [];
- console.log(this.possibleMoves);
e.target.parentNode.appendChild(this.selectedPiece);
}
},