mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-04 12:33:55 -07:00
[Player] Rename player to player logic (#6913)
Took 13 minutes Took 6 seconds Took 2 minutes Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
71790d8e10
commit
5219cffa6b
79 changed files with 397 additions and 386 deletions
|
|
@ -12,7 +12,7 @@
|
|||
#include <libcockatrice/protocol/pb/serverinfo_playerproperties.pb.h>
|
||||
|
||||
class AbstractGame;
|
||||
class Player;
|
||||
class PlayerLogic;
|
||||
class PlayerManager : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
@ -21,7 +21,7 @@ public:
|
|||
PlayerManager(AbstractGame *_game, int _localPlayerId, bool _localPlayerIsJudge, bool localPlayerIsSpectator);
|
||||
|
||||
AbstractGame *game;
|
||||
QMap<int, Player *> players;
|
||||
QMap<int, PlayerLogic *> players;
|
||||
int localPlayerId;
|
||||
bool localPlayerIsJudge;
|
||||
bool localPlayerIsSpectator;
|
||||
|
|
@ -42,7 +42,7 @@ public:
|
|||
return localPlayerId;
|
||||
}
|
||||
|
||||
[[nodiscard]] const QMap<int, Player *> &getPlayers() const
|
||||
[[nodiscard]] const QMap<int, PlayerLogic *> &getPlayers() const
|
||||
{
|
||||
return players;
|
||||
}
|
||||
|
|
@ -52,14 +52,14 @@ public:
|
|||
return players.size();
|
||||
}
|
||||
|
||||
[[nodiscard]] Player *getActiveLocalPlayer(int activePlayer) const;
|
||||
[[nodiscard]] PlayerLogic *getActiveLocalPlayer(int activePlayer) const;
|
||||
bool isLocalPlayer(int playerId);
|
||||
|
||||
Player *addPlayer(int playerId, const ServerInfo_User &info);
|
||||
PlayerLogic *addPlayer(int playerId, const ServerInfo_User &info);
|
||||
|
||||
void removePlayer(int playerId);
|
||||
|
||||
[[nodiscard]] Player *getPlayer(int playerId) const;
|
||||
[[nodiscard]] PlayerLogic *getPlayer(int playerId) const;
|
||||
|
||||
void onPlayerConceded(int playerId, bool conceded);
|
||||
|
||||
|
|
@ -106,8 +106,8 @@ public:
|
|||
}
|
||||
|
||||
signals:
|
||||
void playerAdded(Player *player);
|
||||
void playerRemoved(Player *player);
|
||||
void playerAdded(PlayerLogic *player);
|
||||
void playerRemoved(PlayerLogic *player);
|
||||
void activeLocalPlayerConceded();
|
||||
void activeLocalPlayerUnconceded();
|
||||
void playerConceded(int playerId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue