// Precompute hints squares to facilitate rendering
let hintSquares = doubleArray(sizeX, sizeY, false);
this.possibleMoves.forEach(m => { hintSquares[m.end.x][m.end.y] = true; });
// Precompute hints squares to facilitate rendering
let hintSquares = doubleArray(sizeX, sizeY, false);
this.possibleMoves.forEach(m => { hintSquares[m.end.x][m.end.y] = true; });
case "newgame": //opponent found
// oppid: opponent socket ID
this.newGame("human", data.fen, data.color, data.oppid);
case "newgame": //opponent found
// oppid: opponent socket ID
this.newGame("human", data.fen, data.color, data.oppid);
this.endGame(this.mycolor=="w"?"0-1":"1-0");
},
newGame: function(mode, fenInit, color, oppId, moves, continuation) {
this.endGame(this.mycolor=="w"?"0-1":"1-0");
},
newGame: function(mode, fenInit, color, oppId, moves, continuation) {