projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Draft of problems section
[vchess.git]
/
client
/
src
/
views
/
Game.vue
diff --git
a/client/src/views/Game.vue
b/client/src/views/Game.vue
index
062990d
..
88f2b5e
100644
(file)
--- a/
client/src/views/Game.vue
+++ b/
client/src/views/Game.vue
@@
-560,8
+560,13
@@
export default {
GameStorage.get(this.gameRef.id, afterRetrieval);
}
},
GameStorage.get(this.gameRef.id, afterRetrieval);
}
},
- // Post-process a move (which was just played)
+ // Post-process a move (which was just played
in BaseGame
)
processMove: function(move) {
processMove: function(move) {
+ if (this.game.type == "corr" && move.color == this.game.mycolor)
+ {
+ if (!confirm(this.st.tr["Are you sure?"]))
+ return this.$set(this.game, "moveToUndo", move);
+ }
// Update storage (corr or live) if I play in the game
const colorIdx = ["w","b"].indexOf(move.color);
const nextIdx = ["w","b"].indexOf(this.vr.turn);
// Update storage (corr or live) if I play in the game
const colorIdx = ["w","b"].indexOf(move.color);
const nextIdx = ["w","b"].indexOf(this.vr.turn);