projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Better randomness in Ball variant + notify when receiving targetting challenge
[vchess.git]
/
client
/
src
/
components
/
BaseGame.vue
diff --git
a/client/src/components/BaseGame.vue
b/client/src/components/BaseGame.vue
index
0ed908a
..
51d087a
100644
(file)
--- a/
client/src/components/BaseGame.vue
+++ b/
client/src/components/BaseGame.vue
@@
-21,6
+21,7
@@
div#baseGame
:vname="game.vname"
:incheck="incheck"
@play-move="play"
:vname="game.vname"
:incheck="incheck"
@play-move="play"
+ @click-square="clickSquare"
)
#turnIndicator(v-if="showTurn") {{ turn }}
#controls.button-group
)
#turnIndicator(v-if="showTurn") {{ turn }}
#controls.button-group
@@
-364,6
+365,11
@@
export default {
);
}
},
);
}
},
+ clickSquare: function(square) {
+ // Some variants make use of a single click at specific times:
+ const move = this.vr.doClick(square);
+ if (!!move) this.play(move);
+ },
// "light": if gotoMove() or gotoEnd()
play: function(move, received, light, noemit) {
// Freeze while choices are shown:
// "light": if gotoMove() or gotoEnd()
play: function(move, received, light, noemit) {
// Freeze while choices are shown: