projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixes for corr games update + incomplete info (do not show board)
[vchess.git]
/
client
/
src
/
playCompMove.js
diff --git
a/client/src/playCompMove.js
b/client/src/playCompMove.js
index
d8dd2d4
..
05c2286
100644
(file)
--- a/
client/src/playCompMove.js
+++ b/
client/src/playCompMove.js
@@
-12,7
+12,11
@@
onmessage = async function(e) {
break;
}
case "newmove":
break;
}
case "newmove":
- self.vr.play(e.data[1]);
+ let move = e.data[1];
+ // Caution: could be a multi-move
+ if (!Array.isArray(move))
+ move = [move];
+ move.forEach(m => self.vr.play(m));
break;
case "askmove": {
const compMove = self.vr.getComputerMove();
break;
case "askmove": {
const compMove = self.vr.getComputerMove();