This repository has been archived by the owner on Sep 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
11 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
function LobbyFactory(){ | ||
|
||
return { | ||
createLobby: createLobby | ||
} | ||
|
||
function createLobby(name){ | ||
var lobby; | ||
|
||
lobby = { | ||
name: name || "", | ||
hostSettings: [], | ||
playerSettings: [] | ||
}; | ||
|
||
return lobby; | ||
} | ||
} | ||
|
||
module.exports = LobbyFactory(); |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
function ClientManagerService(){ | ||
var clients = []; | ||
|
||
return { | ||
connected: connected, | ||
disconnected: disconnected, | ||
}; | ||
|
||
function connected(client){ | ||
clients.push(client); | ||
} | ||
|
||
function disconnected(client){ | ||
clients.splice(clients.indexOf(client), 1); | ||
} | ||
} | ||
|
||
module.exports = ClientManagerService(); |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"gameModes": { | ||
"LeagueSandbox-Default": [ | ||
"Dev", | ||
"1.0.2", | ||
"1.0.1", | ||
"1.0.0" | ||
], | ||
"Mythic-Dev": [ | ||
"Dev" | ||
], | ||
"SomeGuy-SomeMode": [ | ||
"0.0.2", | ||
"0.0.1" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "lobby-server", | ||
"version": "1.0.0", | ||
"description": "League Sandbox Lobby Server", | ||
"main": "server.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/LeagueSandbox/LobbyServer.git" | ||
}, | ||
"author": "League Sandbox", | ||
"license": "GPL-3.0", | ||
"bugs": { | ||
"url": "https://github.com/LeagueSandbox/LobbyServer/issues" | ||
}, | ||
"homepage": "https://github.com/LeagueSandbox/LobbyServer#readme" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
var port = 9090; | ||
var io = require('socket.io')(port); | ||
var ClientManagerService = require('./app/services/ClientManagerService'); | ||
|
||
console.log("League Sandbox Lobby Server"); | ||
console.log("---------------------------"); | ||
console.log("Listening on port " + port); | ||
|
||
|
||
io.on('connection', function(client){ | ||
console.log("Client connected"); | ||
ClientManagerService.connected(client); | ||
|
||
client.on('disconnect', function(){ | ||
console.log("Client disconnected"); | ||
ClientManagerService.disconnected(client); | ||
}); | ||
}); |
Empty file.