mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-24 23:53:54 -07:00
* [Game][Player] Pull out graphics_items out of player_logic Took 25 seconds Took 9 minutes * [Game] Move graphics files into game_graphics Took 1 minute Took 2 minutes Took 23 seconds Took 1 minute Took 2 seconds * Include. Took 4 minutes Took 3 minutes Took 4 minutes Took 1 minute Took 3 minutes --------- 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 "../../game_graphics/player/player_target.h"
|
|
|
|
#include <QObject>
|
|
#include <libcockatrice/protocol/pb/serverinfo_user.pb.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
|