Cockatrice/cockatrice/src/game/player/player_info.h
BruebachL c5fde071e7
[Cleanup] Unused #includes (#6367)
* [Cleanup] Unused #includes

Took 44 minutes

* [Cleanup] More unused #includes

Took 55 minutes

* [Cleanup] Include QSet

Took 4 minutes

* [Cleanup] Include QDebug in deck_list.cpp

Took 3 minutes

* [Cleanup] Include protocol stuff in servatrice_database_interface.h

Took 3 minutes

* [Cleanup] Include QDialogButtonBox

Took 8 minutes

* [Cleanup] Include QUrl

Took 8 minutes

* [Cleanup] Include QTextOption in header.

Took 3 minutes

* [Cleanup] Include QMap in user_list_manager.h

Took 8 minutes

* [Cleanup] Adjust qjson

Took 8 minutes

* [Cleanup] include button box.

Took 3 minutes

* [Cleanup] Redo fwd declarations.

* [Cleanup] Redo last removed fwd declarations.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-29 18:53:11 +01:00

70 lines
1.2 KiB
C++

/**
* @file player_info.h
* @ingroup GameLogicPlayers
* @brief TODO: Document this.
*/
#ifndef COCKATRICE_PLAYER_INFO_H
#define COCKATRICE_PLAYER_INFO_H
#include "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;
bool handVisible;
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;
}
void setHandVisible(bool _handVisible)
{
handVisible = _handVisible;
}
bool getHandVisible() const
{
return handVisible;
}
QString getName() const
{
return QString::fromStdString(userInfo->name());
}
};
#endif // COCKATRICE_PLAYER_INFO_H