projects
/
vchess.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4486a21
)
Tiny changes in Game view
author
Benjamin Auder
<benjamin.auder@somewhere>
Thu, 9 May 2019 10:38:20 +0000
(12:38 +0200)
committer
Benjamin Auder
<benjamin.auder@somewhere>
Thu, 9 May 2019 10:38:20 +0000
(12:38 +0200)
client/src/views/Game.vue
patch
|
blob
|
blame
|
history
diff --git
a/client/src/views/Game.vue
b/client/src/views/Game.vue
index
2f55cfa
..
44341a8
100644
(file)
--- a/
client/src/views/Game.vue
+++ b/
client/src/views/Game.vue
@@
-29,7
+29,7
@@
pareil quand quelqu'un reco.
</template>
<script>
</template>
<script>
-import B
oard from "@/components/Board
.vue";
+import B
aseGame from "@/components/BaseGame
.vue";
//import Chat from "@/components/Chat.vue";
//import MoveList from "@/components/MoveList.vue";
import { store } from "@/store";
//import Chat from "@/components/Chat.vue";
//import MoveList from "@/components/MoveList.vue";
import { store } from "@/store";
@@
-52,7
+52,7
@@
export default {
////////////
gameRef: {id: "", rid: ""}, //given in URL (rid = remote ID, if applicable)
mode: "live", //or "corr"
////////////
gameRef: {id: "", rid: ""}, //given in URL (rid = remote ID, if applicable)
mode: "live", //or "corr"
- v
ariant: {}
, //filled when game is retrieved
+ v
name: ""
, //filled when game is retrieved
drawOfferSent: false, //did I just ask for draw?
players: [], //filled later (2 to 4 players)
people: [], //potential observers
drawOfferSent: false, //did I just ask for draw?
players: [], //filled later (2 to 4 players)
people: [], //potential observers
@@
-101,7
+101,7
@@
export default {
// TODO: observer on dark games must see all board ? Or alternate ? (seems better)
// ...or just see nothing as on buho21
this.$refs["baseGame"].play(
// TODO: observer on dark games must see all board ? Or alternate ? (seems better)
// ...or just see nothing as on buho21
this.$refs["baseGame"].play(
- data.move, this.v
ariant.
name!="Dark" ? "animate" : null);
+ data.move, this.vname!="Dark" ? "animate" : null);
break;
case "pong": //received if we sent a ping (game still alive on our side)
if (this.gameRef.id != data.gameId)
break;
case "pong": //received if we sent a ping (game still alive on our side)
if (this.gameRef.id != data.gameId)
@@
-236,8
+236,9
@@
export default {
}
this.endGame(this.mycolor=="w"?"0-1":"1-0");
},
}
this.endGame(this.mycolor=="w"?"0-1":"1-0");
},
+ // TODO: vname is unknown before game is loaded (vname is a field in memory)
launchGame: async function() {
launchGame: async function() {
- const vModule = await import("@/variants/" + this.v
ariant.
name + ".js");
+ const vModule = await import("@/variants/" + this.vname + ".js");
window.V = vModule.VariantRules;
this.loadGame(this.gid);
},
window.V = vModule.VariantRules;
this.loadGame(this.gid);
},