- const [sizeX,sizeY] = VariantRules.size;
- console.log(sizeX + " " + sizeY);
- const smallScreen = (screen.width <= 420);
+ const [sizeX,sizeY] = [V.size.x,V.size.y];
+ const smallScreen = (window.innerWidth <= 420);
// 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);