}
},
getGameType: function(game) {
- if (!!game.id.match(/^i/)) return "import";
+ if (!!game.id.toString().match(/^i/)) return "import";
return game.cadence.indexOf("d") >= 0 ? "corr" : "live";
},
// Notify something after a new move (to opponent and me on MyGames page)
// - from server (one correspondance game I play[ed] or not)
// - from remote peer (one live game I don't play, finished or not)
fetchGame: function(callback) {
-
-console.log("fecth");
- console.log(this.gameRef);
- console.log(this.gameRef.match(/^i/));
-
if (Number.isInteger(this.gameRef) || !isNaN(parseInt(this.gameRef))) {
// corr games identifiers are integers
ajax(