Constructs a new GameRoomClient instance.
The WebSocket path to connect to. Defaults to /ws.
ReadonlyclientThe ID of the current game room.
The password for the current game room, if applicable.
The Redux-like store that manages the state of the game room.
Information about the current user.
ProtectedaddCloses the current game room.
Creates a new game room.
The id of the game.
The options for the game room.
A promise that resolves to a tuple containing the game room ID and password.
Disconnects the client from the server.
ProtecteddisconnectRetrieves the current state of the game room from server.
A promise that resolves to the game room state data.
Checks if the current user currecntly occupies a specific seat.
The index of the seat to check.
true if the user can occupy the seat, otherwise false.
Checks if a specific seat is empty.
The index of the seat to check.
true if the seat is empty, otherwise false.
Joins an existing game room.
The ID of the game room to join.
Optionalpassword: stringThe password for the game room, if required.
A promise that resolves to the game room ID.
Leaves a specific seat in the game room.
The index of the seat to leave.
ProtectedonReconnects the client to the server and reinitializes the game room state.
The authorization token for the user.
Gets the seat index of the current user.
The seat index of the user.
Starts the client by connecting to the server and authorizing the user.
The authorization token for the user.
A promise that resolves to true if the client started successfully, otherwise false.
Takes the first available seat in the game room.
A promise that resolves to the index of the seat taken.
Takes a specific seat in the game room.
The index of the seat to take.
The
GameRoomClientclass extends theBaseClientand provides functionality for interacting with a game room server. It manages the state of the game room, handles WebSocket events, and provides methods for creating, joining, and managing game rooms and seats.