Board Game Client
BoardGameClient for network communication in BGW applications. Inherit from this class and override its open functions. By default, these do nothing if not overridden.
Parameters
The server secret.
The desired network logging verbosity. Default: NetworkLogging.NO_LOGGING.
Functions
Creates a new game session on the server by sending a CreateGameMessage. The session ID will be set automatically and returned through the onCreateGameResponse.
Creates a new game session on the server by sending a CreateGameMessage.
Disconnects from the remote server.
Called when server sent a CreateGameResponse after a CreateGameMessage was sent.
Called when an opponent sent a GameActionMessage. This method is supposed to act as a fallback solution if not for all Subclasses of GameAction a dedicated handler was registered using GameActionReceiver annotation.
Called when server sent a GameActionResponse after a GameActionMessage was sent.
Called when server sent a JoinGameResponse after a JoinGameMessage was sent.
Called when server sent a LeaveGameResponse after a LeaveGameMessage was sent.
Called when a player joined the session and the server sent a PlayerJoinedNotification.
Called when a player left the session and the server sent a PlayerLeftNotification.
Called when a spectator joined the session and the server sent a SpectatorJoinedNotification.
Called when server sent a SpectatorJoinGameResponse after a SpectatorJoinGameMessage was sent.
Sends a GameActionMessage to all connected players.
Joins an existing game session as a spectator on the server by sending a SpectatorJoinGameMessage.