1#ifndef ABSTRACT_PARTICIPANT_H
2#define ABSTRACT_PARTICIPANT_H
8#include <libcockatrice/protocol/pb/card_attributes.pb.h>
9#include <libcockatrice/protocol/pb/response.pb.h>
14class ServerInfo_Player;
15class ServerInfo_PlayerProperties;
16class GameEventContainer;
21class Command_KickFromGame;
22class Command_LeaveGame;
25class Command_Mulligan;
27class Command_DrawCards;
28class Command_UndoDraw;
29class Command_FlipCard;
30class Command_AttachCard;
31class Command_CreateToken;
32class Command_CreateArrow;
33class Command_DeleteArrow;
34class Command_SetCardAttr;
35class Command_SetCardCounter;
36class Command_IncCardCounter;
37class Command_ReadyStart;
39class Command_Unconcede;
41class Command_IncCounter;
42class Command_CreateCounter;
43class Command_SetCounter;
44class Command_DelCounter;
45class Command_NextTurn;
46class Command_SetActivePhase;
47class Command_DumpZone;
48class Command_RevealCards;
49class Command_ReverseTurn;
50class Command_MoveCard;
51class Command_SetSideboardPlan;
52class Command_DeckSelect;
53class Command_SetSideboardLock;
54class Command_ChangeZoneProperties;
72 const ServerInfo_User &_userInfo,
109 void getProperties(ServerInfo_PlayerProperties &result,
bool withUserInfo);
111 virtual Response::ResponseCode
113 virtual Response::ResponseCode
116 virtual Response::ResponseCode
119 virtual Response::ResponseCode
121 virtual Response::ResponseCode
123 virtual Response::ResponseCode
125 virtual Response::ResponseCode
129 virtual Response::ResponseCode
131 virtual Response::ResponseCode
133 virtual Response::ResponseCode
135 virtual Response::ResponseCode
137 virtual Response::ResponseCode
139 virtual Response::ResponseCode
141 virtual Response::ResponseCode
143 virtual Response::ResponseCode
145 virtual Response::ResponseCode
147 virtual Response::ResponseCode
149 virtual Response::ResponseCode
151 virtual Response::ResponseCode
153 virtual Response::ResponseCode
155 virtual Response::ResponseCode
157 virtual Response::ResponseCode
159 virtual Response::ResponseCode
161 virtual Response::ResponseCode
163 virtual Response::ResponseCode
165 virtual Response::ResponseCode
167 virtual Response::ResponseCode
169 virtual Response::ResponseCode
171 virtual Response::ResponseCode
173 virtual Response::ResponseCode
Definition server_response_containers.h:46
Definition server_response_containers.h:89
ServerInfo_User_Container(ServerInfo_User *_userInfo=nullptr)
Definition serverinfo_user_container.cpp:5
Definition server_abstract_participant.h:57
Server_Game * game
Definition server_abstract_participant.h:60
virtual Response::ResponseCode cmdUndoDraw(const Command_UndoDraw &cmd, ResponseContainer &rc, GameEventStorage &ges)
Definition server_abstract_participant.cpp:247
virtual Response::ResponseCode cmdDeleteArrow(const Command_DeleteArrow &cmd, ResponseContainer &rc, GameEventStorage &ges)
Definition server_abstract_participant.cpp:289
Server_AbstractUserInterface * getUserInterface() const
Definition server_abstract_participant.h:81
int getPingTime() const
Definition server_abstract_participant.h:104
QMutex playerMutex
Definition server_abstract_participant.h:67
virtual Response::ResponseCode cmdDelCounter(const Command_DelCounter &cmd, ResponseContainer &rc, GameEventStorage &ges)
Definition server_abstract_participant.cpp:338
virtual Response::ResponseCode cmdIncCardCounter(const Command_IncCardCounter &cmd, ResponseContainer &rc, GameEventStorage &ges)
Definition server_abstract_participant.cpp:310
int getPlayerId() const
Definition server_abstract_participant.h:88
void setUserInterface(Server_AbstractUserInterface *_userInterface)
Definition server_abstract_participant.cpp:542
virtual void prepareDestroy()
Definition server_abstract_participant.h:76
~Server_AbstractParticipant() override
bool updatePingTime()
Definition server_abstract_participant.cpp:73
virtual Response::ResponseCode cmdIncCounter(const Command_IncCounter &cmd, ResponseContainer &rc, GameEventStorage &ges)
Definition server_abstract_participant.cpp:317
void getProperties(ServerInfo_PlayerProperties &result, bool withUserInfo)
Definition server_abstract_participant.cpp:87
virtual Response::ResponseCode cmdUnconcede(const Command_Unconcede &cmd, ResponseContainer &rc, GameEventStorage &ges)
Definition server_abstract_participant.cpp:154
virtual Response::ResponseCode cmdMulligan(const Command_Mulligan &cmd, ResponseContainer &rc, GameEventStorage &ges)
Definition server_abstract_participant.cpp:226
virtual Response::ResponseCode cmdSetCounter(const Command_SetCounter &cmd, ResponseContainer &rc, GameEventStorage &ges)
Definition server_abstract_participant.cpp:331
virtual Response::ResponseCode cmdSetCardCounter(const Command_SetCardCounter &cmd, ResponseContainer &rc, GameEventStorage &ges)
Definition server_abstract_participant.cpp:303
virtual Response::ResponseCode cmdGameSay(const Command_GameSay &cmd, ResponseContainer &rc, GameEventStorage &ges)
Definition server_abstract_participant.cpp:190
virtual Response::ResponseCode cmdLeaveGame(const Command_LeaveGame &cmd, ResponseContainer &rc, GameEventStorage &ges)
Definition server_abstract_participant.cpp:103
virtual Response::ResponseCode cmdAttachCard(const Command_AttachCard &cmd, ResponseContainer &rc, GameEventStorage &ges)
Definition server_abstract_participant.cpp:268
virtual Response::ResponseCode cmdCreateCounter(const Command_CreateCounter &cmd, ResponseContainer &rc, GameEventStorage &ges)
Definition server_abstract_participant.cpp:324
virtual Response::ResponseCode cmdConcede(const Command_Concede &cmd, ResponseContainer &rc, GameEventStorage &ges)
Definition server_abstract_participant.cpp:147
Response::ResponseCode processGameCommand(const GameCommand &command, ResponseContainer &rc, GameEventStorage &ges)
Definition server_abstract_participant.cpp:423
virtual Response::ResponseCode cmdChangeZoneProperties(const Command_ChangeZoneProperties &cmd, ResponseContainer &rc, GameEventStorage &ges)
Definition server_abstract_participant.cpp:392
virtual Response::ResponseCode cmdKickFromGame(const Command_KickFromGame &cmd, ResponseContainer &rc, GameEventStorage &ges)
Definition server_abstract_participant.cpp:111
Server_Game * getGame() const
Definition server_abstract_participant.h:100
virtual Response::ResponseCode cmdRevealCards(const Command_RevealCards &cmd, ResponseContainer &rc, GameEventStorage &ges)
Definition server_abstract_participant.cpp:385
virtual Response::ResponseCode cmdDeckSelect(const Command_DeckSelect &cmd, ResponseContainer &rc, GameEventStorage &ges)
Definition server_abstract_participant.cpp:126
void sendGameEvent(const GameEventContainer &event)
Definition server_abstract_participant.cpp:533
virtual Response::ResponseCode cmdSetCardAttr(const Command_SetCardAttr &cmd, ResponseContainer &rc, GameEventStorage &ges)
Definition server_abstract_participant.cpp:296
void removeFromGame()
Definition server_abstract_participant.cpp:65
virtual Response::ResponseCode cmdRollDie(const Command_RollDie &cmd, ResponseContainer &rc, GameEventStorage &ges) const
Definition server_abstract_participant.cpp:233
virtual Response::ResponseCode cmdReadyStart(const Command_ReadyStart &cmd, ResponseContainer &rc, GameEventStorage &ges)
Definition server_abstract_participant.cpp:182
bool judge
Definition server_abstract_participant.h:65
virtual Response::ResponseCode cmdCreateToken(const Command_CreateToken &cmd, ResponseContainer &rc, GameEventStorage &ges)
Definition server_abstract_participant.cpp:275
virtual void getPlayerProperties(ServerInfo_PlayerProperties &result)
Definition server_abstract_participant.cpp:99
bool getSpectator() const
Definition server_abstract_participant.h:92
virtual void getInfo(ServerInfo_Player *info, Server_AbstractParticipant *recipient, bool omniscient, bool withUserInfo)
Definition server_abstract_participant.cpp:569
void disconnectClient()
Definition server_abstract_participant.cpp:559
Server_AbstractParticipant(Server_Game *_game, int _playerId, const ServerInfo_User &_userInfo, bool _judge, Server_AbstractUserInterface *_handler)
Definition server_abstract_participant.cpp:53
virtual Response::ResponseCode cmdSetSideboardPlan(const Command_SetSideboardPlan &cmd, ResponseContainer &rc, GameEventStorage &ges)
Definition server_abstract_participant.cpp:133
virtual Response::ResponseCode cmdReverseTurn(const Command_ReverseTurn &, ResponseContainer &, GameEventStorage &ges)
Definition server_abstract_participant.cpp:399
int playerId
Definition server_abstract_participant.h:63
virtual Response::ResponseCode cmdDumpZone(const Command_DumpZone &cmd, ResponseContainer &rc, GameEventStorage &ges)
Definition server_abstract_participant.cpp:378
virtual Response::ResponseCode cmdFlipCard(const Command_FlipCard &cmd, ResponseContainer &rc, GameEventStorage &ges)
Definition server_abstract_participant.cpp:261
virtual Response::ResponseCode cmdMoveCard(const Command_MoveCard &cmd, ResponseContainer &rc, GameEventStorage &ges)
Definition server_abstract_participant.cpp:254
virtual Response::ResponseCode cmdNextTurn(const Command_NextTurn &cmd, ResponseContainer &rc, GameEventStorage &ges)
Definition server_abstract_participant.cpp:345
bool spectator
Definition server_abstract_participant.h:64
bool getJudge() const
Definition server_abstract_participant.h:96
virtual Response::ResponseCode cmdCreateArrow(const Command_CreateArrow &cmd, ResponseContainer &rc, GameEventStorage &ges)
Definition server_abstract_participant.cpp:282
virtual Response::ResponseCode cmdSetActivePhase(const Command_SetActivePhase &cmd, ResponseContainer &rc, GameEventStorage &ges)
Definition server_abstract_participant.cpp:361
int pingTime
Definition server_abstract_participant.h:62
virtual Response::ResponseCode cmdSetSideboardLock(const Command_SetSideboardLock &cmd, ResponseContainer &rc, GameEventStorage &ges)
Definition server_abstract_participant.cpp:140
virtual Response::ResponseCode cmdShuffle(const Command_Shuffle &cmd, ResponseContainer &rc, GameEventStorage &ges)
Definition server_abstract_participant.cpp:219
virtual Response::ResponseCode cmdJudge(const Command_Judge &cmd, ResponseContainer &rc, GameEventStorage &ges)
Definition server_abstract_participant.cpp:162
virtual Response::ResponseCode cmdDrawCards(const Command_DrawCards &cmd, ResponseContainer &rc, GameEventStorage &ges)
Definition server_abstract_participant.cpp:240
Server_AbstractUserInterface * userInterface
Definition server_abstract_participant.h:61
Definition server_abstractuserinterface.h:20
Definition server_arrowtarget.h:7
Definition server_game.h:47