![]() |
Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
|
#include <player_manager.h>
Signals | |
| void | playerAdded (PlayerLogic *player) |
| void | playerRemoved (PlayerLogic *player) |
| void | activeLocalPlayerConceded () |
| void | activeLocalPlayerUnconceded () |
| void | playerConceded (int playerId) |
| void | playerUnconceded (int playerId) |
| void | playerCountChanged () |
| void | spectatorAdded (ServerInfo_PlayerProperties spectator) |
| void | spectatorRemoved (int spectatorId, ServerInfo_User spectator) |
Public Member Functions | |
| PlayerManager (AbstractGame *_game, int _localPlayerId, bool _localPlayerIsJudge, bool localPlayerIsSpectator) | |
| bool | isSpectator () const |
| bool | isJudge () const |
| int | getLocalPlayerId () const |
| const QMap< int, PlayerLogic * > & | getPlayers () const |
| int | getPlayerCount () const |
| PlayerLogic * | getActiveLocalPlayer (int activePlayer) const |
| bool | isLocalPlayer (int playerId) |
| PlayerLogic * | addPlayer (int playerId, const ServerInfo_User &info) |
| void | removePlayer (int playerId) |
| PlayerLogic * | getPlayer (int playerId) const |
| void | onPlayerConceded (int playerId, bool conceded) |
| bool | isMainPlayerConceded () const |
| bool | isLocalPlayer (int playerId) const |
| const QMap< int, ServerInfo_User > & | getSpectators () const |
| ServerInfo_User | getSpectator (int playerId) const |
| QString | getSpectatorName (int spectatorId) const |
| void | addSpectator (int spectatorId, const ServerInfo_PlayerProperties &prop) |
| void | removeSpectator (int spectatorId) |
| void | clearSpectators () |
| Remove all spectators, emitting the removal signal for each. | |
| AbstractGame * | getGame () const |
Public Attributes | |
| AbstractGame * | game |
| QMap< int, PlayerLogic * > | players |
| int | localPlayerId |
| bool | localPlayerIsJudge |
| bool | localPlayerIsSpectator |
| QMap< int, ServerInfo_User > | spectators |
| PlayerManager::PlayerManager | ( | AbstractGame * | _game, |
| int | _localPlayerId, | ||
| bool | _localPlayerIsJudge, | ||
| bool | localPlayerIsSpectator ) |
|
signal |
|
signal |
| PlayerLogic * PlayerManager::addPlayer | ( | int | playerId, |
| const ServerInfo_User & | info ) |
|
inline |
| void PlayerManager::clearSpectators | ( | ) |
Remove all spectators, emitting the removal signal for each.
|
nodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
nodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
| bool PlayerManager::isLocalPlayer | ( | int | playerId | ) |
|
inlinenodiscard |
|
nodiscard |
|
inlinenodiscard |
| void PlayerManager::onPlayerConceded | ( | int | playerId, |
| bool | conceded ) |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
| void PlayerManager::removePlayer | ( | int | playerId | ) |
|
inline |
|
signal |
|
signal |
| AbstractGame* PlayerManager::game |
| int PlayerManager::localPlayerId |
| bool PlayerManager::localPlayerIsJudge |
| bool PlayerManager::localPlayerIsSpectator |
| QMap<int, PlayerLogic *> PlayerManager::players |
| QMap<int, ServerInfo_User> PlayerManager::spectators |