Build a new game manager
game information
Server socket reference
Array of player tokens that will play this game
Optional GUI reference
Server startup options
Handle each individual game
Game's winner, used to update the state
Whether the game was stopped due to a player disconnecting. If true, the session will be finished
Handles a specific player move - this returns a function configured for the specified player, it's intended to be used as the callback for the player socket.
Player number (0-1)
Move handler with the player number embedded for logging
Log a message to the console or the GUI if it's enabled
only for GUI mode, set to true to avoid re-rendering
Receive a move from a player and convert it to an object of board and move
String received from the client
Play an individual game between two players
Send an action to a player
Action to send
Player number (0-1)
Handle the end of a session between two players
Encode a move received from a player to be sent to the opponent
Generated using TypeDoc
Online game manager between two players