projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixes
[vchess.git]
/
client
/
src
/
components
/
ComputerGame.vue
diff --git
a/client/src/components/ComputerGame.vue
b/client/src/components/ComputerGame.vue
index
2745e4c
..
52cfc5e
100644
(file)
--- a/
client/src/components/ComputerGame.vue
+++ b/
client/src/components/ComputerGame.vue
@@
-1,8
+1,6
@@
<template lang="pug">
<template lang="pug">
-.row
- .col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
- BaseGame(:game="game" :vr="vr" ref="basegame"
- @newmove="processMove" @gameover="gameOver")
+BaseGame(:game="game" :vr="vr" ref="basegame"
+ @newmove="processMove" @gameover="gameOver")
</template>
<script>
</template>
<script>
@@
-50,7
+48,11
@@
export default {
this.compWorker.onmessage = e => {
let compMove = e.data;
if (!compMove)
this.compWorker.onmessage = e => {
let compMove = e.data;
if (!compMove)
+ {
+ this.compThink = false;
+ this.$emit("game-stopped"); //no more moves: mate or stalemate
return; //after game ends, no more moves, nothing to do
return; //after game ends, no more moves, nothing to do
+ }
if (!Array.isArray(compMove))
compMove = [compMove]; //to deal with MarseilleRules
// Small delay for the bot to appear "more human"
if (!Array.isArray(compMove))
compMove = [compMove]; //to deal with MarseilleRules
// Small delay for the bot to appear "more human"