X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FGame.vue;h=7a99ef9b3348729ba96f28caa25abdb7d7dedaa8;hp=c60b17c741b744d0099a6402391292943435028b;hb=ce87ac6a12007a62a55a45e404f818df3eb90f64;hpb=4fe5664d48e37cf7e0de7562e8e76e8698b0ea74 diff --git a/client/src/views/Game.vue b/client/src/views/Game.vue index c60b17c7..7a99ef9b 100644 --- a/client/src/views/Game.vue +++ b/client/src/views/Game.vue @@ -48,6 +48,7 @@ export default { gameInfo: {}, //passed to BaseGame vr: null, //TODO vname: "", //obtained from gameInfo (slightly redundant..) + mode: "analyze", //mutable drawOfferSent: false, //did I just ask for draw? (TODO: draw variables?) people: [], //potential observers (TODO) }; @@ -242,7 +243,11 @@ export default { // - from remote peer (one live game I don't play, finished or not) loadGame: async function() { this.gameInfo = GameStorage.get(this.gameRef); + +console.log(GameStorage.get(this.gameRef)); + this.vname = this.gameInfo.vname; + this.mode = this.gameInfo.mode; const vModule = await import("@/variants/" + this.vname + ".js"); window.V = vModule.VariantRules; this.vr = new V(this.gameInfo.fen); @@ -260,6 +265,9 @@ export default { oppConnected: function(uid) { return this.opponents.some(o => o.id == uid && o.online); }, + processMove: function(move) { + // TODO: process some opponent's move + }, }, };