group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
LobbyStatus.hpp
Go to the documentation of this file.
1
3
4#pragma once
6
7#include <cstdint>
8#include <string>
9#include <vector>
10
13{
15 bool ready = false;
16 bool isHost = false;
17};
18
21{
22 uint32_t count;
23 std::vector<LobbyPlayer> players;
24};
25
Network client identifier component for multiplayer entities.
Associates an entity with a connected network client.
Definition ClientId.hpp:10
Per-player state entry in the lobby.
Definition LobbyStatus.hpp:13
ClientId id
Network identity of this player.
Definition LobbyStatus.hpp:14
bool isHost
True if this player is the current lobby host.
Definition LobbyStatus.hpp:16
bool ready
True when the player has confirmed they are ready to play.
Definition LobbyStatus.hpp:15
Full lobby snapshot sent to a client upon joining.
Definition LobbyStatus.hpp:21
std::vector< LobbyPlayer > players
Ordered list of all connected players.
Definition LobbyStatus.hpp:23
uint32_t count
Number of players currently in the lobby.
Definition LobbyStatus.hpp:22
Incremental lobby change event broadcast to all connected clients.
Definition LobbyStatus.hpp:28
Type type
Kind of lobby change.
Definition LobbyStatus.hpp:39
ClientId id
Player this event applies to.
Definition LobbyStatus.hpp:40
Type
Discriminator for the type of lobby change.
Definition LobbyStatus.hpp:31
@ PlayerUnready
A player toggled their ready status to not ready.
Definition LobbyStatus.hpp:35
@ PlayerLeft
A player disconnected or left the lobby.
Definition LobbyStatus.hpp:33
@ PlayerNewHost
Host assignment transferred to a different player.
Definition LobbyStatus.hpp:36
@ PlayerReady
A player toggled their ready status to ready.
Definition LobbyStatus.hpp:34
@ PlayerJoined
A new player connected and entered the lobby.
Definition LobbyStatus.hpp:32