changed function( to function (

This commit is contained in:
logsol 2012-07-28 13:38:31 +02:00
parent 26f3d22db7
commit 7e5eeb0a27
36 changed files with 209 additions and 209 deletions

View file

@ -3,14 +3,14 @@ define([
"Game/Server/CoordinatorLink"
],
function(Channel, CoordinatorLink) {
function (Channel, CoordinatorLink) {
function ChannelBootstrap(process) {
var coordinatorLink = new CoordinatorLink(process);
var channel = null;
process.on('message', function(message) {
process.on('message', function (message) {
switch(message){
case 'CREATE':

View file

@ -3,7 +3,7 @@ define([
"Lib/Vendor/SocketIO"
],
function(Networker, SocketIO) {
function (Networker, SocketIO) {
function Client(location, options) {
this.socket = SocketIO.connect(location, options);

View file

@ -3,7 +3,7 @@ define([
'node-static'
],
function(http, nodeStatic) {
function (http, nodeStatic) {
function HttpServer(options) {
options.port = options.port || 1234;
@ -15,13 +15,13 @@ function(http, nodeStatic) {
this.init(options);
}
HttpServer.prototype.init = function(options) {
HttpServer.prototype.init = function (options) {
var self = this;
var fileServer = new nodeStatic.Server(options.rootDirectory, { cache: options.caching });
this.server = http.createServer(
function(req, res){
function (req, res){
req.addListener('end', function () {
switch(true) {
case req.url == '/':
@ -37,13 +37,13 @@ function(http, nodeStatic) {
break;
case new RegExp(/^\/app/).test(req.url):
fileServer.serve(req, res, function(){
fileServer.serve(req, res, function (){
self.handleFileError(res)
});
break;
case new RegExp(/^\/static/).test(req.url):
fileServer.serve(req, res, function(){
fileServer.serve(req, res, function (){
self.handleFileError(res)
});
break;
@ -58,7 +58,7 @@ function(http, nodeStatic) {
this.server.listen(options.port);
}
HttpServer.prototype.getServer = function(){
HttpServer.prototype.getServer = function (){
return this.server;
}

View file

@ -4,7 +4,7 @@ define([
"Lobby/Coordinator"
],
function(HttpServer, Socket, Coordinator) {
function (HttpServer, Socket, Coordinator) {
function Server(options) {
coordinator = new Coordinator();

View file

@ -2,7 +2,7 @@ define([
'socket.io'
],
function(io) {
function (io) {
function Socket(server, options, coordinator) {
options.logLevel = typeof options.logLevel != 'undefined'
@ -15,19 +15,19 @@ function(io) {
this.init(options);
}
Socket.prototype.init = function(options){
Socket.prototype.init = function (options){
var self = this;
this.socket.configure('development', function(){
this.socket.configure('development', function (){
this.set('log level', options.logLevel);
});
this.socket.on('connection', function(user){
this.socket.on('connection', function (user){
self.onConnection(user);
});
}
Socket.prototype.onConnection = function(socketLink){
Socket.prototype.onConnection = function (socketLink){
this.coordinator.createUser(socketLink);
}