mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-05 09:33:25 -08:00
* [Refactor] Move game logic into libcockatrice_game * [Refactor] Include card_state.h in player_actions.h * [Game] Inject settings providers into libcockatrice_game, drop Widgets * [Game] Follow base rename to createCardRequested after rebase * [Game] Drop unused CardItem forward declaration * [Game] Fix includes after moving game logic into libcockatrice_game --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
59 lines
1 KiB
C++
59 lines
1 KiB
C++
/**
|
|
* @file player_info.h
|
|
* @ingroup GameLogicPlayers
|
|
*/
|
|
//! \todo Document this file.
|
|
|
|
#ifndef COCKATRICE_PLAYER_INFO_H
|
|
#define COCKATRICE_PLAYER_INFO_H
|
|
|
|
#include <QObject>
|
|
#include <QString>
|
|
#include <libcockatrice/protocol/pb/serverinfo_user.pb.h>
|
|
#include <qtmetamacros.h>
|
|
|
|
class PlayerInfo : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
PlayerInfo(const ServerInfo_User &info, int id, bool local, bool judge);
|
|
|
|
ServerInfo_User *userInfo;
|
|
int id;
|
|
bool local;
|
|
bool judge;
|
|
|
|
int getId() const
|
|
{
|
|
return id;
|
|
}
|
|
ServerInfo_User *getUserInfo() const
|
|
{
|
|
return userInfo;
|
|
}
|
|
|
|
void setLocal(bool _local)
|
|
{
|
|
local = _local;
|
|
}
|
|
|
|
bool getLocal() const
|
|
{
|
|
return local;
|
|
}
|
|
bool getLocalOrJudge() const
|
|
{
|
|
return local || judge;
|
|
}
|
|
bool getJudge() const
|
|
{
|
|
return judge;
|
|
}
|
|
|
|
QString getName() const
|
|
{
|
|
return QString::fromStdString(userInfo->name());
|
|
}
|
|
};
|
|
|
|
#endif // COCKATRICE_PLAYER_INFO_H
|