Comparing version 0.1.13 to 0.1.14
{ | ||
"name": "cheshire", | ||
"version": "0.1.13", | ||
"version": "0.1.14", | ||
"description": "Turn based boardgame framework based on websocket", | ||
@@ -5,0 +5,0 @@ "main": "server/Cheshire.js", |
@@ -11,4 +11,4 @@ var Storage = require('./data'); | ||
Room.prototype.isMaster = function isMaster(userName) { | ||
return this.users[0] === userName; | ||
Room.prototype.isMaster = function isMaster(user) { | ||
return this.users[0] === user.name; | ||
}; | ||
@@ -69,3 +69,5 @@ | ||
this.isPlaying = true; | ||
console.log('emit signal to the rule'); | ||
rule.emit('game', game); | ||
console.log('done initialize game data'); | ||
this.users.forEach(function(each) { | ||
@@ -72,0 +74,0 @@ Storage.users[each].post('gameStart', {}); |
Sorry, the diff of this file is not supported yet
47420
292