remove __createGameObject
This commit is contained in:
parent
cc6eb8ebbc
commit
382853c097
2 changed files with 17 additions and 28 deletions
|
|
@ -13,17 +13,6 @@ function exists(gameId) {
|
|||
return (!!GAMES[gameId]) || false
|
||||
}
|
||||
|
||||
function __createGameObject(id, rng, puzzle, players, evtInfos, scoreMode) {
|
||||
return {
|
||||
id: id,
|
||||
rng: rng,
|
||||
puzzle: puzzle,
|
||||
players: players,
|
||||
evtInfos: evtInfos,
|
||||
scoreMode: scoreMode,
|
||||
}
|
||||
}
|
||||
|
||||
function __createPlayerObject(id, ts) {
|
||||
return {
|
||||
id: id,
|
||||
|
|
@ -39,7 +28,14 @@ function __createPlayerObject(id, ts) {
|
|||
}
|
||||
|
||||
function newGame({id, rng, puzzle, players, evtInfos, scoreMode}) {
|
||||
const game = __createGameObject(id, rng, puzzle, players, evtInfos, scoreMode)
|
||||
const game = {
|
||||
id: id,
|
||||
rng: rng,
|
||||
puzzle: puzzle,
|
||||
players: players,
|
||||
evtInfos: evtInfos,
|
||||
scoreMode: scoreMode,
|
||||
}
|
||||
setGame(id, game)
|
||||
return game
|
||||
}
|
||||
|
|
@ -743,7 +739,6 @@ function handleInput(gameId, playerId, input, ts) {
|
|||
}
|
||||
|
||||
export default {
|
||||
__createGameObject,
|
||||
__createPlayerObject,
|
||||
newGame,
|
||||
exists,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue