From f51c37cf24a7d695cdd51a3b0298a8ff64c3963a Mon Sep 17 00:00:00 2001
From: Benjamin Auder <benjamin.auder@somewhere>
Date: Wed, 5 Feb 2020 14:18:11 +0100
Subject: [PATCH] Fix incheck bug

---
 client/src/components/BaseGame.vue | 3 ++-
 client/src/components/Board.vue    | 3 +--
 2 files changed, 3 insertions(+), 3 deletions(-)

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,
     };
-- 
2.44.0