mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-14 06:22:15 -07:00
split out spectator to new file
This commit is contained in:
parent
2e35ef11d9
commit
d88426bb61
4 changed files with 28 additions and 21 deletions
|
|
@ -97,16 +97,6 @@ Server_AbstractParticipant::Server_AbstractParticipant(Server_Game *_game,
|
|||
{
|
||||
}
|
||||
|
||||
Server_Spectator::Server_Spectator(Server_Game *_game,
|
||||
int _playerId,
|
||||
const ServerInfo_User &_userInfo,
|
||||
bool _judge,
|
||||
Server_AbstractUserInterface *_userInterface)
|
||||
: Server_AbstractParticipant(_game, _playerId, _userInfo, _judge, _userInterface)
|
||||
{
|
||||
spectator = true;
|
||||
}
|
||||
|
||||
Server_AbstractParticipant::~Server_AbstractParticipant() = default;
|
||||
|
||||
void Server_AbstractParticipant::removeFromGame()
|
||||
|
|
|
|||
|
|
@ -180,15 +180,4 @@ public:
|
|||
getInfo(ServerInfo_Player *info, Server_AbstractParticipant *recipient, bool omniscient, bool withUserInfo);
|
||||
};
|
||||
|
||||
class Server_Spectator : public Server_AbstractParticipant
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
Server_Spectator(Server_Game *_game,
|
||||
int _playerId,
|
||||
const ServerInfo_User &_userInfo,
|
||||
bool _judge,
|
||||
Server_AbstractUserInterface *_handler);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
11
common/server/game/server_spectator.cpp
Normal file
11
common/server/game/server_spectator.cpp
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#include "server_spectator.h"
|
||||
|
||||
Server_Spectator::Server_Spectator(Server_Game *_game,
|
||||
int _playerId,
|
||||
const ServerInfo_User &_userInfo,
|
||||
bool _judge,
|
||||
Server_AbstractUserInterface *_userInterface)
|
||||
: Server_AbstractParticipant(_game, _playerId, _userInfo, _judge, _userInterface)
|
||||
{
|
||||
spectator = true;
|
||||
}
|
||||
17
common/server/game/server_spectator.h
Normal file
17
common/server/game/server_spectator.h
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#ifndef SPECTATOR_H
|
||||
#define SPECTATOR_H
|
||||
|
||||
#include "server_abstract_participant.h"
|
||||
|
||||
class Server_Spectator : public Server_AbstractParticipant
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
Server_Spectator(Server_Game *_game,
|
||||
int _playerId,
|
||||
const ServerInfo_User &_userInfo,
|
||||
bool _judge,
|
||||
Server_AbstractUserInterface *_handler);
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue