Abstract
Protected
constructorCreate a new instance of the game service
Alias used to distingish stored players sessions
Private
_actionsMap of action aliases to a specific action class
Private
_gameMap of game object aliases to a specific game object class
Private
_sessionAlias used to distingish stored players sessions
Abstract
createCreate a new player session object
New player session object
Used by createPlayerSessionMiddleware
Create a new player session middleware for Express
Middleware instance for Express
This middleware does this following:
X-PlayerSessionId
-header.Keep in mind this middleware is not secure by any means, meaning the X-PlayerSessionId
-header can be easily manipulated.
Exectute an action and get its result
Alias of the action to execute
List of game objects to execute the action on
Result of the action or undefined
when unhandled.
Get a game object instance by its alias
Game object alias
Game object instance or undefined
when not found
Get a list of game objects instances by their alias
List of game object aliases
List of game object instances. Can be empty when no game objects were found.
Protected
registerProtected
register
Base class used to operate the game engine