},
created: function() {
GameStorage.getAll(true, localGames => {
-
-
-console.log(localGames);
-
localGames.forEach(g => (g.type = this.classifyObject(g)));
this.liveGames = localGames;
});
},
socketMessageListener: function(msg) {
const data = JSON.parse(msg.data);
- // Only event is newmove, and received only:
- if (data.code == "newmove") {
+ if (data.code == "changeturn") {
let games = !!parseInt(data.gid)
? this.corrGames
: this.liveGames;