initial commit of poker game

This commit is contained in:
Edward Yang
2015-03-20 14:21:44 -07:00
commit cd7f17778f
147 changed files with 10833 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
module.exports = function(app){
return new ChatRemote(app, app.get('chatService'));
};
var ChatRemote = function(app, chatService){
this.app = app;
this.chatService = chatService;
};
/**
* Add player into channel
*/
ChatRemote.prototype.addToChannel = function(uid, cid, cb){
this.chatService.addToChannel(uid, cid, cb);
};
/**
* Add player record
*/
ChatRemote.prototype.add = function(uid, cid, cb){
this.chatService.add(uid, cid, cb);
};
/**
* Get members in a channel
*/
ChatRemote.prototype.getMembers = function(cid, cb){
this.chatService.getMembers(cid, cb);
};
/**
* leave Channel
* uid
* cid
*/
ChatRemote.prototype.leave = function(uid, cid, cb){
this.chatService.leave(uid, cid);
cb();
};
/**
* kick out user
*
*/
ChatRemote.prototype.disconnect = function(uid, cb){
this.chatService.disconnect(uid);
cb();
};