From: Benjamin Auder Date: Wed, 5 Feb 2020 13:18:11 +0000 (+0100) Subject: Fix incheck bug X-Git-Url: https://git.auder.net/variants/doc/html/Rlogo.svg?a=commitdiff_plain;h=f51c37cf24a7d695cdd51a3b0298a8ff64c3963a;p=vchess.git Fix incheck bug --- diff --git a/client/src/components/BaseGame.vue b/client/src/components/BaseGame.vue index 1240bcb2..ea07a6dc 100644 --- a/client/src/components/BaseGame.vue +++ b/client/src/components/BaseGame.vue @@ -17,7 +17,7 @@ div#baseGame(tabindex=-1 @click="() => focusBg()" #boardContainer Board(:vr="vr" :last-move="lastMove" :analyze="analyze" :user-color="game.mycolor" :orientation="orientation" - :vname="game.vname" @play-move="play") + :vname="game.vname" :incheck="incheck" @play-move="play") #turnIndicator(v-if="game.vname=='Dark' && game.score=='*'") | {{ turn }} #controls @@ -71,6 +71,7 @@ export default { cursor: -1, //index of the move just played lastMove: null, firstMoveNumber: 0, //for printing + incheck: [], //for Board }; }, watch: { diff --git a/client/src/components/Board.vue b/client/src/components/Board.vue index 6a20d54b..4123defa 100644 --- a/client/src/components/Board.vue +++ b/client/src/components/Board.vue @@ -8,13 +8,12 @@ export default { // Last move cannot be guessed from here, and is required to highlight squares // vr: object to check moves, print board... // userColor is left undefined for an external observer - props: ["vr","lastMove","analyze","orientation","userColor","vname"], + props: ["vr","lastMove","analyze","incheck","orientation","userColor","vname"], data: function () { return { possibleMoves: [], //filled after each valid click/dragstart choices: [], //promotion pieces, or checkered captures... (as moves) selectedPiece: null, //moving piece (or clicked piece) - incheck: [], start: {}, //pixels coordinates + id of starting square (click or drag) settings: store.state.settings, };