Cockatrice/cockatrice/src/game/player/player_info.h
BruebachL bfedc12fa8
Deck loader is a gui class. (#6294)
* Deck loader is a gui class.

Took 31 minutes

Took 3 minutes

* Deck Loader is responsible for printing.

Took 8 minutes


Took 2 seconds

* Style proxy.

Took 14 minutes

Took 6 minutes

Took 1 minute

* Don't need to include QBrush anymore.

Took 3 minutes

Took 7 seconds

* Includes for printer.

Took 5 minutes

* Nuke getDeckList()

Took 9 minutes

* Adjust to rebase.

Took 35 seconds

* Lint.

Took 3 minutes

* Braces for one line return statements.

Took 13 minutes

Took 50 seconds

* Enum for model columns.

Took 9 minutes

* One more single line if.

Took 1 minute

* Another style lint on a sunday night

Took 5 minutes

* Move enum to namespace.

Took 3 minutes

* Fix a critical blocker.

Took 5 minutes

* Update docs.

Took 3 minutes

* Doxygen and namespace enums.

Took 2 minutes

Took 15 seconds

* Adjust to namespace.

Took 4 minutes

Took 1 minute

---------

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

75 lines
1.3 KiB
C++

/**
* @file player_info.h
* @ingroup GameLogicPlayers
* @brief TODO: Document this.
*/
#ifndef COCKATRICE_PLAYER_INFO_H
#define COCKATRICE_PLAYER_INFO_H
#include "../../interface/deck_loader/deck_loader.h"
#include "../zones/hand_zone.h"
#include "../zones/pile_zone.h"
#include "../zones/stack_zone.h"
#include "../zones/table_zone.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