play: function(move, received, light, noemit) {
// Freeze while choices are shown:
if (this.$refs["board"].choices.length > 0) return;
play: function(move, received, light, noemit) {
// Freeze while choices are shown:
if (this.$refs["board"].choices.length > 0) return;
const initurn = this.vr.turn;
(function executeMove() {
const smove = move[moveIdx++];
const initurn = this.vr.turn;
(function executeMove() {
const smove = move[moveIdx++];
self.animateMove(smove, () => {
playSubmove(smove);
if (moveIdx < move.length)
self.animateMove(smove, () => {
playSubmove(smove);
if (moveIdx < move.length)
const L = this.moves.length;
let move = this.moves[L-1];
if (!Array.isArray(move)) move = [move];
const L = this.moves.length;
let move = this.moves[L-1];
if (!Array.isArray(move)) move = [move];
undo: function(move, light) {
// Freeze while choices are shown:
if (this.$refs["board"].choices.length > 0) return;
undo: function(move, light) {
// Freeze while choices are shown:
if (this.$refs["board"].choices.length > 0) return;
if (this.inMultimove) this.cancelCurrentMultimove();
if (index == this.cursor) return;
if (index < this.cursor) {
if (this.inMultimove) this.cancelCurrentMultimove();
if (index == this.cursor) return;
if (index < this.cursor) {
if (this.inMultimove) this.cancelCurrentMultimove();
const minCursor =
this.moves.length > 0 && this.moves[0].notation == "..."
if (this.inMultimove) this.cancelCurrentMultimove();
const minCursor =
this.moves.length > 0 && this.moves[0].notation == "..."