X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FBaseGame.vue;h=51d087a34b5ce8834a5de6da53725a56332bc6e4;hb=616561273f216debfeab7f5fc532d0b0a8bc8e2d;hp=0ed908a584333fe733ab4243faa594dd164025ae;hpb=0a9cef131612079e55714f56f1466b4e2bd749af;p=vchess.git diff --git a/client/src/components/BaseGame.vue b/client/src/components/BaseGame.vue index 0ed908a5..51d087a3 100644 --- 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" + @click-square="clickSquare" ) #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: