56 virtual bool join(uint32_t playerId) = 0;
70 virtual bool leave(uint32_t playerId) = 0;
76 virtual std::string
getId()
const = 0;
Interface for a game room.
virtual std::vector< uint32_t > getPlayers() const =0
Get list of player IDs in this room.
virtual size_t getMaxPlayers() const =0
Get maximum number of players allowed.
virtual bool hasPlayer(uint32_t playerId) const =0
Check if a player is in this room.
virtual void setState(RoomState state)=0
Set the state of the room.
virtual bool isFull() const =0
Check if room is full.
virtual std::vector< uint32_t > getSpectators() const =0
Get list of spectator IDs in this room.
virtual bool joinAsSpectator(uint32_t playerId)=0
Join a player to the room as a spectator.
virtual std::string getId() const =0
Get the room's unique identifier.
virtual bool hasSpectator(uint32_t playerId) const =0
Check if a spectator is in this room.
virtual RoomState getState() const =0
Get current state of the room.
virtual bool join(uint32_t playerId)=0
Join a player to the room.
virtual size_t getPlayerCount() const =0
Get number of players currently in room.
virtual RoomInfo getInfo() const =0
Get room information.
virtual bool leave(uint32_t playerId)=0
Remove a player from the room.
virtual std::string getName() const =0
Get the room's display name.
RoomState
State of a game room.
Information about a room.