Cockatrice 2025-11-30-Development-2.11.0-beta.38
A cross-platform virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
Server_AbstractParticipant Class Reference

#include <server_abstract_participant.h>

Inheritance diagram for Server_AbstractParticipant:
[legend]
Collaboration diagram for Server_AbstractParticipant:
[legend]

Public Member Functions

 Server_AbstractParticipant (Server_Game *_game, int _playerId, const ServerInfo_User &_userInfo, bool _judge, Server_AbstractUserInterface *_handler)
 ~Server_AbstractParticipant () override
virtual void prepareDestroy ()
void removeFromGame ()
Server_AbstractUserInterfacegetUserInterface () const
void setUserInterface (Server_AbstractUserInterface *_userInterface)
void disconnectClient ()
int getPlayerId () const
bool getSpectator () const
bool getJudge () const
Server_GamegetGame () const
int getPingTime () const
bool updatePingTime ()
void getProperties (ServerInfo_PlayerProperties &result, bool withUserInfo)
virtual Response::ResponseCode cmdLeaveGame (const Command_LeaveGame &cmd, ResponseContainer &rc, GameEventStorage &ges)
virtual Response::ResponseCode cmdKickFromGame (const Command_KickFromGame &cmd, ResponseContainer &rc, GameEventStorage &ges)
virtual Response::ResponseCode cmdConcede (const Command_Concede &cmd, ResponseContainer &rc, GameEventStorage &ges)
virtual Response::ResponseCode cmdUnconcede (const Command_Unconcede &cmd, ResponseContainer &rc, GameEventStorage &ges)
virtual Response::ResponseCode cmdJudge (const Command_Judge &cmd, ResponseContainer &rc, GameEventStorage &ges)
virtual Response::ResponseCode cmdReadyStart (const Command_ReadyStart &cmd, ResponseContainer &rc, GameEventStorage &ges)
virtual Response::ResponseCode cmdDeckSelect (const Command_DeckSelect &cmd, ResponseContainer &rc, GameEventStorage &ges)
virtual Response::ResponseCode cmdSetSideboardPlan (const Command_SetSideboardPlan &cmd, ResponseContainer &rc, GameEventStorage &ges)
virtual Response::ResponseCode cmdSetSideboardLock (const Command_SetSideboardLock &cmd, ResponseContainer &rc, GameEventStorage &ges)
virtual Response::ResponseCode cmdGameSay (const Command_GameSay &cmd, ResponseContainer &rc, GameEventStorage &ges)
virtual Response::ResponseCode cmdShuffle (const Command_Shuffle &cmd, ResponseContainer &rc, GameEventStorage &ges)
virtual Response::ResponseCode cmdMulligan (const Command_Mulligan &cmd, ResponseContainer &rc, GameEventStorage &ges)
virtual Response::ResponseCode cmdRollDie (const Command_RollDie &cmd, ResponseContainer &rc, GameEventStorage &ges) const
virtual Response::ResponseCode cmdDrawCards (const Command_DrawCards &cmd, ResponseContainer &rc, GameEventStorage &ges)
virtual Response::ResponseCode cmdUndoDraw (const Command_UndoDraw &cmd, ResponseContainer &rc, GameEventStorage &ges)
virtual Response::ResponseCode cmdMoveCard (const Command_MoveCard &cmd, ResponseContainer &rc, GameEventStorage &ges)
virtual Response::ResponseCode cmdFlipCard (const Command_FlipCard &cmd, ResponseContainer &rc, GameEventStorage &ges)
virtual Response::ResponseCode cmdAttachCard (const Command_AttachCard &cmd, ResponseContainer &rc, GameEventStorage &ges)
virtual Response::ResponseCode cmdCreateToken (const Command_CreateToken &cmd, ResponseContainer &rc, GameEventStorage &ges)
virtual Response::ResponseCode cmdCreateArrow (const Command_CreateArrow &cmd, ResponseContainer &rc, GameEventStorage &ges)
virtual Response::ResponseCode cmdDeleteArrow (const Command_DeleteArrow &cmd, ResponseContainer &rc, GameEventStorage &ges)
virtual Response::ResponseCode cmdSetCardAttr (const Command_SetCardAttr &cmd, ResponseContainer &rc, GameEventStorage &ges)
virtual Response::ResponseCode cmdSetCardCounter (const Command_SetCardCounter &cmd, ResponseContainer &rc, GameEventStorage &ges)
virtual Response::ResponseCode cmdIncCardCounter (const Command_IncCardCounter &cmd, ResponseContainer &rc, GameEventStorage &ges)
virtual Response::ResponseCode cmdIncCounter (const Command_IncCounter &cmd, ResponseContainer &rc, GameEventStorage &ges)
virtual Response::ResponseCode cmdCreateCounter (const Command_CreateCounter &cmd, ResponseContainer &rc, GameEventStorage &ges)
virtual Response::ResponseCode cmdSetCounter (const Command_SetCounter &cmd, ResponseContainer &rc, GameEventStorage &ges)
virtual Response::ResponseCode cmdDelCounter (const Command_DelCounter &cmd, ResponseContainer &rc, GameEventStorage &ges)
virtual Response::ResponseCode cmdNextTurn (const Command_NextTurn &cmd, ResponseContainer &rc, GameEventStorage &ges)
virtual Response::ResponseCode cmdSetActivePhase (const Command_SetActivePhase &cmd, ResponseContainer &rc, GameEventStorage &ges)
virtual Response::ResponseCode cmdDumpZone (const Command_DumpZone &cmd, ResponseContainer &rc, GameEventStorage &ges)
virtual Response::ResponseCode cmdRevealCards (const Command_RevealCards &cmd, ResponseContainer &rc, GameEventStorage &ges)
virtual Response::ResponseCode cmdReverseTurn (const Command_ReverseTurn &, ResponseContainer &, GameEventStorage &ges)
virtual Response::ResponseCode cmdChangeZoneProperties (const Command_ChangeZoneProperties &cmd, ResponseContainer &rc, GameEventStorage &ges)
Response::ResponseCode processGameCommand (const GameCommand &command, ResponseContainer &rc, GameEventStorage &ges)
void sendGameEvent (const GameEventContainer &event)
virtual void getInfo (ServerInfo_Player *info, Server_AbstractParticipant *recipient, bool omniscient, bool withUserInfo)
Public Member Functions inherited from ServerInfo_User_Container
 ServerInfo_User_Container (ServerInfo_User *_userInfo=nullptr)
 ServerInfo_User_Container (const ServerInfo_User &_userInfo)
 ServerInfo_User_Container (const ServerInfo_User_Container &other)
ServerInfo_User_Containeroperator= (const ServerInfo_User_Container &other)=default
virtual ~ServerInfo_User_Container ()
ServerInfo_User * getUserInfo () const
void setUserInfo (const ServerInfo_User &_userInfo)
ServerInfo_User & copyUserInfo (ServerInfo_User &result, bool complete, bool internalInfo=false, bool sessionInfo=false) const
ServerInfo_User copyUserInfo (bool complete, bool internalInfo=false, bool sessionInfo=false) const

Protected Member Functions

virtual void getPlayerProperties (ServerInfo_PlayerProperties &result)

Protected Attributes

Server_Gamegame
Server_AbstractUserInterfaceuserInterface
int pingTime
int playerId
bool spectator
bool judge
QMutex playerMutex
Protected Attributes inherited from ServerInfo_User_Container
ServerInfo_User * userInfo

Constructor & Destructor Documentation

◆ Server_AbstractParticipant()

Server_AbstractParticipant::Server_AbstractParticipant ( Server_Game * _game,
int _playerId,
const ServerInfo_User & _userInfo,
bool _judge,
Server_AbstractUserInterface * _handler )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~Server_AbstractParticipant()

Server_AbstractParticipant::~Server_AbstractParticipant ( )
overridedefault

Member Function Documentation

◆ cmdAttachCard()

Response::ResponseCode Server_AbstractParticipant::cmdAttachCard ( const Command_AttachCard & cmd,
ResponseContainer & rc,
GameEventStorage & ges )
virtual

Reimplemented in Server_AbstractPlayer.

Here is the caller graph for this function:

◆ cmdChangeZoneProperties()

Response::ResponseCode Server_AbstractParticipant::cmdChangeZoneProperties ( const Command_ChangeZoneProperties & cmd,
ResponseContainer & rc,
GameEventStorage & ges )
virtual

Reimplemented in Server_AbstractPlayer, and Server_Player.

Here is the caller graph for this function:

◆ cmdConcede()

Response::ResponseCode Server_AbstractParticipant::cmdConcede ( const Command_Concede & cmd,
ResponseContainer & rc,
GameEventStorage & ges )
virtual

Reimplemented in Server_AbstractPlayer.

Here is the caller graph for this function:

◆ cmdCreateArrow()

Response::ResponseCode Server_AbstractParticipant::cmdCreateArrow ( const Command_CreateArrow & cmd,
ResponseContainer & rc,
GameEventStorage & ges )
virtual

Reimplemented in Server_AbstractPlayer.

Here is the caller graph for this function:

◆ cmdCreateCounter()

Response::ResponseCode Server_AbstractParticipant::cmdCreateCounter ( const Command_CreateCounter & cmd,
ResponseContainer & rc,
GameEventStorage & ges )
virtual

Reimplemented in Server_Player.

Here is the caller graph for this function:

◆ cmdCreateToken()

Response::ResponseCode Server_AbstractParticipant::cmdCreateToken ( const Command_CreateToken & cmd,
ResponseContainer & rc,
GameEventStorage & ges )
virtual

Reimplemented in Server_AbstractPlayer.

Here is the caller graph for this function:

◆ cmdDeckSelect()

Response::ResponseCode Server_AbstractParticipant::cmdDeckSelect ( const Command_DeckSelect & cmd,
ResponseContainer & rc,
GameEventStorage & ges )
virtual

Reimplemented in Server_Player.

Here is the caller graph for this function:

◆ cmdDelCounter()

Response::ResponseCode Server_AbstractParticipant::cmdDelCounter ( const Command_DelCounter & cmd,
ResponseContainer & rc,
GameEventStorage & ges )
virtual

Reimplemented in Server_Player.

Here is the caller graph for this function:

◆ cmdDeleteArrow()

Response::ResponseCode Server_AbstractParticipant::cmdDeleteArrow ( const Command_DeleteArrow & cmd,
ResponseContainer & rc,
GameEventStorage & ges )
virtual

Reimplemented in Server_AbstractPlayer.

Here is the caller graph for this function:

◆ cmdDrawCards()

Response::ResponseCode Server_AbstractParticipant::cmdDrawCards ( const Command_DrawCards & cmd,
ResponseContainer & rc,
GameEventStorage & ges )
virtual

Reimplemented in Server_Player.

Here is the caller graph for this function:

◆ cmdDumpZone()

Response::ResponseCode Server_AbstractParticipant::cmdDumpZone ( const Command_DumpZone & cmd,
ResponseContainer & rc,
GameEventStorage & ges )
virtual

Reimplemented in Server_AbstractPlayer.

Here is the caller graph for this function:

◆ cmdFlipCard()

Response::ResponseCode Server_AbstractParticipant::cmdFlipCard ( const Command_FlipCard & cmd,
ResponseContainer & rc,
GameEventStorage & ges )
virtual

Reimplemented in Server_AbstractPlayer.

Here is the caller graph for this function:

◆ cmdGameSay()

Response::ResponseCode Server_AbstractParticipant::cmdGameSay ( const Command_GameSay & cmd,
ResponseContainer & rc,
GameEventStorage & ges )
virtual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cmdIncCardCounter()

Response::ResponseCode Server_AbstractParticipant::cmdIncCardCounter ( const Command_IncCardCounter & cmd,
ResponseContainer & rc,
GameEventStorage & ges )
virtual

Reimplemented in Server_AbstractPlayer.

Here is the caller graph for this function:

◆ cmdIncCounter()

Response::ResponseCode Server_AbstractParticipant::cmdIncCounter ( const Command_IncCounter & cmd,
ResponseContainer & rc,
GameEventStorage & ges )
virtual

Reimplemented in Server_Player.

Here is the caller graph for this function:

◆ cmdJudge()

Response::ResponseCode Server_AbstractParticipant::cmdJudge ( const Command_Judge & cmd,
ResponseContainer & rc,
GameEventStorage & ges )
virtual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cmdKickFromGame()

Response::ResponseCode Server_AbstractParticipant::cmdKickFromGame ( const Command_KickFromGame & cmd,
ResponseContainer & rc,
GameEventStorage & ges )
virtual
Here is the caller graph for this function:

◆ cmdLeaveGame()

Response::ResponseCode Server_AbstractParticipant::cmdLeaveGame ( const Command_LeaveGame & cmd,
ResponseContainer & rc,
GameEventStorage & ges )
virtual
Here is the caller graph for this function:

◆ cmdMoveCard()

Response::ResponseCode Server_AbstractParticipant::cmdMoveCard ( const Command_MoveCard & cmd,
ResponseContainer & rc,
GameEventStorage & ges )
virtual

Reimplemented in Server_AbstractPlayer.

Here is the caller graph for this function:

◆ cmdMulligan()

Response::ResponseCode Server_AbstractParticipant::cmdMulligan ( const Command_Mulligan & cmd,
ResponseContainer & rc,
GameEventStorage & ges )
virtual

Reimplemented in Server_Player.

Here is the caller graph for this function:

◆ cmdNextTurn()

Response::ResponseCode Server_AbstractParticipant::cmdNextTurn ( const Command_NextTurn & cmd,
ResponseContainer & rc,
GameEventStorage & ges )
virtual

Reimplemented in Server_Player.

Here is the caller graph for this function:

◆ cmdReadyStart()

Response::ResponseCode Server_AbstractParticipant::cmdReadyStart ( const Command_ReadyStart & cmd,
ResponseContainer & rc,
GameEventStorage & ges )
virtual

Reimplemented in Server_AbstractPlayer.

Here is the caller graph for this function:

◆ cmdRevealCards()

Response::ResponseCode Server_AbstractParticipant::cmdRevealCards ( const Command_RevealCards & cmd,
ResponseContainer & rc,
GameEventStorage & ges )
virtual

Reimplemented in Server_AbstractPlayer.

Here is the caller graph for this function:

◆ cmdReverseTurn()

Response::ResponseCode Server_AbstractParticipant::cmdReverseTurn ( const Command_ReverseTurn & ,
ResponseContainer & ,
GameEventStorage & ges )
virtual

Reimplemented in Server_Player.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cmdRollDie()

Response::ResponseCode Server_AbstractParticipant::cmdRollDie ( const Command_RollDie & cmd,
ResponseContainer & rc,
GameEventStorage & ges ) const
virtual

Reimplemented in Server_AbstractPlayer.

Here is the caller graph for this function:

◆ cmdSetActivePhase()

Response::ResponseCode Server_AbstractParticipant::cmdSetActivePhase ( const Command_SetActivePhase & cmd,
ResponseContainer & rc,
GameEventStorage & ges )
virtual

Reimplemented in Server_Player.

Here is the caller graph for this function:

◆ cmdSetCardAttr()

Response::ResponseCode Server_AbstractParticipant::cmdSetCardAttr ( const Command_SetCardAttr & cmd,
ResponseContainer & rc,
GameEventStorage & ges )
virtual

Reimplemented in Server_AbstractPlayer.

Here is the caller graph for this function:

◆ cmdSetCardCounter()

Response::ResponseCode Server_AbstractParticipant::cmdSetCardCounter ( const Command_SetCardCounter & cmd,
ResponseContainer & rc,
GameEventStorage & ges )
virtual

Reimplemented in Server_AbstractPlayer.

Here is the caller graph for this function:

◆ cmdSetCounter()

Response::ResponseCode Server_AbstractParticipant::cmdSetCounter ( const Command_SetCounter & cmd,
ResponseContainer & rc,
GameEventStorage & ges )
virtual

Reimplemented in Server_Player.

Here is the caller graph for this function:

◆ cmdSetSideboardLock()

Response::ResponseCode Server_AbstractParticipant::cmdSetSideboardLock ( const Command_SetSideboardLock & cmd,
ResponseContainer & rc,
GameEventStorage & ges )
virtual

Reimplemented in Server_Player.

Here is the caller graph for this function:

◆ cmdSetSideboardPlan()

Response::ResponseCode Server_AbstractParticipant::cmdSetSideboardPlan ( const Command_SetSideboardPlan & cmd,
ResponseContainer & rc,
GameEventStorage & ges )
virtual

Reimplemented in Server_Player.

Here is the caller graph for this function:

◆ cmdShuffle()

Response::ResponseCode Server_AbstractParticipant::cmdShuffle ( const Command_Shuffle & cmd,
ResponseContainer & rc,
GameEventStorage & ges )
virtual

Reimplemented in Server_Player.

Here is the caller graph for this function:

◆ cmdUnconcede()

Response::ResponseCode Server_AbstractParticipant::cmdUnconcede ( const Command_Unconcede & cmd,
ResponseContainer & rc,
GameEventStorage & ges )
virtual

Reimplemented in Server_AbstractPlayer.

Here is the caller graph for this function:

◆ cmdUndoDraw()

Response::ResponseCode Server_AbstractParticipant::cmdUndoDraw ( const Command_UndoDraw & cmd,
ResponseContainer & rc,
GameEventStorage & ges )
virtual

Reimplemented in Server_Player.

Here is the caller graph for this function:

◆ disconnectClient()

void Server_AbstractParticipant::disconnectClient ( )
Here is the call graph for this function:

◆ getGame()

Server_Game * Server_AbstractParticipant::getGame ( ) const
inline

◆ getInfo()

void Server_AbstractParticipant::getInfo ( ServerInfo_Player * info,
Server_AbstractParticipant * recipient,
bool omniscient,
bool withUserInfo )
virtual

Reimplemented in Server_AbstractPlayer, and Server_Player.

Here is the call graph for this function:

◆ getJudge()

bool Server_AbstractParticipant::getJudge ( ) const
inline
Here is the caller graph for this function:

◆ getPingTime()

int Server_AbstractParticipant::getPingTime ( ) const
inline

◆ getPlayerId()

int Server_AbstractParticipant::getPlayerId ( ) const
inline
Here is the caller graph for this function:

◆ getPlayerProperties()

void Server_AbstractParticipant::getPlayerProperties ( ServerInfo_PlayerProperties & result)
protectedvirtual

Reimplemented in Server_AbstractPlayer.

Here is the caller graph for this function:

◆ getProperties()

void Server_AbstractParticipant::getProperties ( ServerInfo_PlayerProperties & result,
bool withUserInfo )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSpectator()

bool Server_AbstractParticipant::getSpectator ( ) const
inline
Here is the caller graph for this function:

◆ getUserInterface()

Server_AbstractUserInterface * Server_AbstractParticipant::getUserInterface ( ) const
inline

◆ prepareDestroy()

virtual void Server_AbstractParticipant::prepareDestroy ( )
inlinevirtual

Reimplemented in Server_AbstractPlayer.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ processGameCommand()

Response::ResponseCode Server_AbstractParticipant::processGameCommand ( const GameCommand & command,
ResponseContainer & rc,
GameEventStorage & ges )
Here is the call graph for this function:

◆ removeFromGame()

void Server_AbstractParticipant::removeFromGame ( )
Here is the caller graph for this function:

◆ sendGameEvent()

void Server_AbstractParticipant::sendGameEvent ( const GameEventContainer & event)
Here is the caller graph for this function:

◆ setUserInterface()

void Server_AbstractParticipant::setUserInterface ( Server_AbstractUserInterface * _userInterface)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updatePingTime()

bool Server_AbstractParticipant::updatePingTime ( )

Member Data Documentation

◆ game

Server_Game* Server_AbstractParticipant::game
protected

◆ judge

bool Server_AbstractParticipant::judge
protected

◆ pingTime

int Server_AbstractParticipant::pingTime
protected

◆ playerId

int Server_AbstractParticipant::playerId
protected

◆ playerMutex

QMutex Server_AbstractParticipant::playerMutex
mutableprotected

◆ spectator

bool Server_AbstractParticipant::spectator
protected

◆ userInterface

Server_AbstractUserInterface* Server_AbstractParticipant::userInterface
protected

The documentation for this class was generated from the following files: