- // Post-processing (e.g. computer play)
- this.$emit("newmove", this.moves[L-1], data);
+ if (!noemit)
+ // Post-processing (e.g. computer play).
+ // NOTE: always emit the score, even in unfinished,
+ // to tell Game::processMove() that it's not a received move.
+ this.$emit("newmove", this.moves[L-1], { score: score });
+ else {
+ this.inPlay = false;
+ if (this.stackToPlay.length > 0)
+ // Move(s) arrived in-between
+ this.play(this.stackToPlay.pop(), received, light, noemit);
+ }