From: Benjamin Auder <benjamin.auder@somewhere>
Date: Tue, 2 Apr 2019 15:52:08 +0000 (+0200)
Subject: Need to pass props from Game to ComputerGame to BaseGame to Board...
X-Git-Url: https://git.auder.net/%7B%7B%20asset('mixstore/doc/current/current/git-favicon.png?a=commitdiff_plain;h=bc8734ba58ae6ed81c157e89d51db9f275af16a7;p=vchess.git

Need to pass props from Game to ComputerGame to BaseGame to Board...
---

diff --git a/client/src/components/BaseGame.vue b/client/src/components/BaseGame.vue
index ceadcd3a..c898b2ff 100644
--- a/client/src/components/BaseGame.vue
+++ b/client/src/components/BaseGame.vue
@@ -37,11 +37,11 @@ export default {
     Board,
     //MoveList,
   },
-  props: ["variant","analyze","players"],
+  // "vr": VariantRules object, describing the game state + rules
+  props: ["vr","variant","analyze","players"],
   data: function() {
     return {
       st: store.state,
-      vr: null, //VariantRules object, describing the game state + rules
       endgameMessage: "",
       orientation: "w",
       score: "*", //'*' means 'unfinished'
diff --git a/client/src/components/ComputerGame.vue b/client/src/components/ComputerGame.vue
index a15686fd..962960a4 100644
--- a/client/src/components/ComputerGame.vue
+++ b/client/src/components/ComputerGame.vue
@@ -1,7 +1,7 @@
 <template lang="pug">
 .row
   .col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
-    BaseGame(:variant="variant.name" :analyze="analyze" : players="players")
+    BaseGame(:variant="variant.name" :analyze="analyze" :players="players")
 </template>
 
 <script>
@@ -24,9 +24,7 @@ export default {
       lockCompThink: false, //to avoid some ghost moves
       fenStart: "",
       compWorker: null,
-
-//TODO: players ? Computed?
-
+      players: ["Myself","Computer"], //always playing white for now
     };
   },
   computed: {