mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
added Server and Client Game
This commit is contained in:
parent
e959c8e7a2
commit
bffb16e77c
5 changed files with 57 additions and 10 deletions
|
|
@ -1,10 +1,9 @@
|
|||
define(["Chuck/Game"], function(Game) {
|
||||
define(["Chuck/ServerGame"], function(ServerGame) {
|
||||
|
||||
function Channel(name) {
|
||||
this.name = name;
|
||||
this.users = {};
|
||||
this.game = new Game();
|
||||
// create game here
|
||||
this.serverGame = new ServerGame(this);
|
||||
}
|
||||
|
||||
Channel.validateName = function(name){
|
||||
|
|
@ -19,6 +18,10 @@ define(["Chuck/Game"], function(Game) {
|
|||
delete this.users[user.id];
|
||||
}
|
||||
|
||||
Channel.prototype.sendToAllUsers = function(package) {
|
||||
console.log("not implemented sendToAllUsers: " + JSON.stringify(package))
|
||||
}
|
||||
|
||||
return Channel;
|
||||
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue