if (!game.mycolor) game.mycolor = (Math.random() < 0.5 ? "w" : "b");
this.compWorker.postMessage(["init", game.fen]);
this.vr = new V(game.fen);
if (!game.mycolor) game.mycolor = (Math.random() < 0.5 ? "w" : "b");
this.compWorker.postMessage(["init", game.fen]);
this.vr = new V(game.fen);
// If comp is thinking, let him finish:
if (!this.compThink) this.$emit("game-stopped");
}
// If comp is thinking, let him finish:
if (!this.compThink) this.$emit("game-stopped");
}