added Server and Client Game

This commit is contained in:
Jeena Paradies 2012-07-13 19:33:52 +02:00
parent e959c8e7a2
commit bffb16e77c
5 changed files with 57 additions and 10 deletions

View file

@ -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;
});