projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix some variants and improve a few other things a little bit
[vchess.git]
/
client
/
src
/
components
/
ComputerGame.vue
diff --git
a/client/src/components/ComputerGame.vue
b/client/src/components/ComputerGame.vue
index
aee1f70
..
9699c5a
100644
(file)
--- a/
client/src/components/ComputerGame.vue
+++ b/
client/src/components/ComputerGame.vue
@@
-38,7
+38,8
@@
export default {
this.compWorker.onmessage = e => {
let compMove = e.data;
// Small delay for the bot to appear "more human"
this.compWorker.onmessage = e => {
let compMove = e.data;
// Small delay for the bot to appear "more human"
- const delay = Math.max(500 - (Date.now() - this.timeStart), 0);
+ const minDelay = this.gameInfo.mode == "versus" ? 500 : 1000;
+ const delay = Math.max(minDelay - (Date.now() - this.timeStart), 0);
let self = this;
setTimeout(() => {
if (this.currentUrl != document.location.href) return; //page change
let self = this;
setTimeout(() => {
if (this.currentUrl != document.location.href) return; //page change