this.conn = null;
},
getRandomnessClass: function(pc) {
- if (!pc.options.randomness) return {};
+ if (
+ // TODO: one extra test here
+ !Number.isInteger(pc.options.randomness) &&
+ !parseInt(pc.options.randomness, 10)
+ ) {
+ return {};
+ }
return {
["random-" + pc.options.randomness]: true
};
moves: [],
clocks: [-1, -1], //-1 = unstarted
chats: [],
- score: "*"
+ score: "*",
+ options: JSON.stringify(gameInfo.options)
}
);
setTimeout(