mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 18:47:35 +00:00
24 lines
No EOL
401 B
JavaScript
24 lines
No EOL
401 B
JavaScript
define(["Chuck/Game"], function(Game) {
|
|
|
|
function Channel(name) {
|
|
this.name = name;
|
|
this.users = {};
|
|
this.game = new Game();
|
|
// create game here
|
|
}
|
|
|
|
Channel.validateName = function(name){
|
|
return true;
|
|
}
|
|
|
|
Channel.prototype.addUser = function(user){
|
|
this.users[user.id] = user;
|
|
}
|
|
|
|
Channel.prototype.releaseUser = function(user){
|
|
delete this.users[user.id];
|
|
}
|
|
|
|
return Channel;
|
|
|
|
}); |