Cockatrice 2026-06-01-Development-3.1.0-beta.3
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
PlayerLogic Class Reference

#include <player_logic.h>

Inheritance diagram for PlayerLogic:
[legend]
Collaboration diagram for PlayerLogic:
[legend]

Public Slots

void setActive (bool _active)

Signals

void openDeckEditor (const LoadedDeck &deck)
void deckChanged ()
void newCardAdded (AbstractCardItem *card)
void counterAdded (CounterState *state)
void counterRemoved (int counterId)
void rearrangeCounters ()
void activeChanged (bool active)
void zoneIdChanged (int zoneId)
void concededChanged (int playerId, bool conceded)
void clearCustomZonesMenu ()
void addViewCustomZoneActionToCustomZoneMenu (QString zoneName)
void resetTopCardMenuActions ()
void arrowCreateRequested (ArrowData data)
void arrowDeleteRequested (int arrowId)
void arrowDeleted (int arrowId)
void arrowsCleared ()

Public Member Functions

 PlayerLogic (const ServerInfo_User &info, int _id, bool _local, bool _judge, AbstractGame *_parent)
 ~PlayerLogic () override
void initializeZones ()
void updateZones ()
void clear ()
void processPlayerInfo (const ServerInfo_Player &info)
void processCardAttachment (const ServerInfo_Player &info)
void addCard (CardItem *c)
void deleteCard (CardItem *c)
bool clearCardsToDelete ()
bool getActive () const
AbstractGamegetGame () const
GameScenegetGameScene ()
PlayerGraphicsItemgetGraphicsItem ()
PlayerActionsgetPlayerActions () const
PlayerEventHandlergetPlayerEventHandler () const
PlayerInfogetPlayerInfo () const
PlayerMenugetPlayerMenu () const
void setDeck (const DeckList &_deck)
const DeckListgetDeck () const
template<typename T>
T * addZone (T *zone)
CardZoneLogicgetZone (const QString zoneName)
const QMap< QString, CardZoneLogic * > & getZones () const
PileZoneLogicgetDeckZone ()
PileZoneLogicgetGraveZone ()
PileZoneLogicgetRfgZone ()
PileZoneLogicgetSideboardZone ()
TableZoneLogicgetTableZone ()
StackZoneLogicgetStackZone ()
HandZoneLogicgetHandZone ()
CounterStateaddCounter (const ServerInfo_Counter &counter)
CounterStateaddCounter (int id, const QString &name, const QColor &color, int radius, int value)
void delCounter (int counterId)
void clearCounters ()
QMap< int, CounterState * > getCounters () const
CounterStategetLifeCounter () const
void setConceded (bool _conceded)
bool getConceded () const
void setGameStarted ()
void setDialogSemaphore (const bool _active)
int getZoneId () const
void setZoneId (int _zoneId)

Private Attributes

AbstractGamegame
PlayerInfoplayerInfo
PlayerEventHandlerplayerEventHandler
PlayerActionsplayerActions
PlayerMenuplayerMenu
PlayerGraphicsItemgraphicsItem
bool active
bool conceded
DeckList deck
int zoneId
QMap< QString, CardZoneLogic * > zones
QMap< int, CounterState * > counters
bool dialogSemaphore
QList< CardItem * > cardsToDelete

Constructor & Destructor Documentation

◆ PlayerLogic()

PlayerLogic::PlayerLogic ( const ServerInfo_User & info,
int _id,
bool _local,
bool _judge,
AbstractGame * _parent )
Here is the call graph for this function:

◆ ~PlayerLogic()

PlayerLogic::~PlayerLogic ( )
override
Here is the call graph for this function:

Member Function Documentation

◆ activeChanged

void PlayerLogic::activeChanged ( bool active)
signal
Here is the caller graph for this function:

◆ addCard()

void PlayerLogic::addCard ( CardItem * c)
Here is the call graph for this function:

◆ addCounter() [1/2]

CounterState * PlayerLogic::addCounter ( const ServerInfo_Counter & counter)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addCounter() [2/2]

CounterState * PlayerLogic::addCounter ( int id,
const QString & name,
const QColor & color,
int radius,
int value )
Here is the call graph for this function:

◆ addViewCustomZoneActionToCustomZoneMenu

void PlayerLogic::addViewCustomZoneActionToCustomZoneMenu ( QString zoneName)
signal
Here is the caller graph for this function:

◆ addZone()

template<typename T>
T * PlayerLogic::addZone ( T * zone)
inline
Here is the caller graph for this function:

◆ arrowCreateRequested

void PlayerLogic::arrowCreateRequested ( ArrowData data)
signal
Here is the caller graph for this function:

◆ arrowDeleted

void PlayerLogic::arrowDeleted ( int arrowId)
signal
Here is the caller graph for this function:

◆ arrowDeleteRequested

void PlayerLogic::arrowDeleteRequested ( int arrowId)
signal
Here is the caller graph for this function:

◆ arrowsCleared

void PlayerLogic::arrowsCleared ( )
signal
Here is the caller graph for this function:

◆ clear()

void PlayerLogic::clear ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ clearCardsToDelete()

bool PlayerLogic::clearCardsToDelete ( )

◆ clearCounters()

void PlayerLogic::clearCounters ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ clearCustomZonesMenu

void PlayerLogic::clearCustomZonesMenu ( )
signal
Here is the caller graph for this function:

◆ concededChanged

void PlayerLogic::concededChanged ( int playerId,
bool conceded )
signal
Here is the caller graph for this function:

◆ counterAdded

void PlayerLogic::counterAdded ( CounterState * state)
signal
Here is the caller graph for this function:

◆ counterRemoved

void PlayerLogic::counterRemoved ( int counterId)
signal
Here is the caller graph for this function:

◆ deckChanged

void PlayerLogic::deckChanged ( )
signal
Here is the caller graph for this function:

◆ delCounter()

void PlayerLogic::delCounter ( int counterId)
Here is the call graph for this function:

◆ deleteCard()

void PlayerLogic::deleteCard ( CardItem * c)
Here is the call graph for this function:

◆ getActive()

bool PlayerLogic::getActive ( ) const
inline

◆ getConceded()

bool PlayerLogic::getConceded ( ) const
inline
Here is the caller graph for this function:

◆ getCounters()

QMap< int, CounterState * > PlayerLogic::getCounters ( ) const
inline

◆ getDeck()

const DeckList & PlayerLogic::getDeck ( ) const
inlinenodiscard

◆ getDeckZone()

PileZoneLogic * PlayerLogic::getDeckZone ( )
inline

◆ getGame()

AbstractGame * PlayerLogic::getGame ( ) const
inline

◆ getGameScene()

GameScene * PlayerLogic::getGameScene ( )
Here is the call graph for this function:

◆ getGraphicsItem()

PlayerGraphicsItem * PlayerLogic::getGraphicsItem ( )
nodiscard
Here is the caller graph for this function:

◆ getGraveZone()

PileZoneLogic * PlayerLogic::getGraveZone ( )
inline

◆ getHandZone()

HandZoneLogic * PlayerLogic::getHandZone ( )
inline

◆ getLifeCounter()

CounterState * PlayerLogic::getLifeCounter ( ) const

Gets the counter that represents the life total.

◆ getPlayerActions()

PlayerActions * PlayerLogic::getPlayerActions ( ) const
inlinenodiscard
Here is the caller graph for this function:

◆ getPlayerEventHandler()

PlayerEventHandler * PlayerLogic::getPlayerEventHandler ( ) const
inlinenodiscard
Here is the caller graph for this function:

◆ getPlayerInfo()

PlayerInfo * PlayerLogic::getPlayerInfo ( ) const
inlinenodiscard

◆ getPlayerMenu()

PlayerMenu * PlayerLogic::getPlayerMenu ( ) const
inlinenodiscard
Here is the caller graph for this function:

◆ getRfgZone()

PileZoneLogic * PlayerLogic::getRfgZone ( )
inline

◆ getSideboardZone()

PileZoneLogic * PlayerLogic::getSideboardZone ( )
inline

◆ getStackZone()

StackZoneLogic * PlayerLogic::getStackZone ( )
inline

◆ getTableZone()

TableZoneLogic * PlayerLogic::getTableZone ( )
inline
Here is the caller graph for this function:

◆ getZone()

CardZoneLogic * PlayerLogic::getZone ( const QString zoneName)
inline

◆ getZoneId()

int PlayerLogic::getZoneId ( ) const
inline

◆ getZones()

const QMap< QString, CardZoneLogic * > & PlayerLogic::getZones ( ) const
inline
Here is the caller graph for this function:

◆ initializeZones()

void PlayerLogic::initializeZones ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ newCardAdded

void PlayerLogic::newCardAdded ( AbstractCardItem * card)
signal
Here is the caller graph for this function:

◆ openDeckEditor

void PlayerLogic::openDeckEditor ( const LoadedDeck & deck)
signal
Here is the caller graph for this function:

◆ processCardAttachment()

void PlayerLogic::processCardAttachment ( const ServerInfo_Player & info)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ processPlayerInfo()

void PlayerLogic::processPlayerInfo ( const ServerInfo_Player & info)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rearrangeCounters

void PlayerLogic::rearrangeCounters ( )
signal
Here is the caller graph for this function:

◆ resetTopCardMenuActions

void PlayerLogic::resetTopCardMenuActions ( )
signal
Here is the caller graph for this function:

◆ setActive

void PlayerLogic::setActive ( bool _active)
slot
Here is the call graph for this function:

◆ setConceded()

void PlayerLogic::setConceded ( bool _conceded)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setDeck()

void PlayerLogic::setDeck ( const DeckList & _deck)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setDialogSemaphore()

void PlayerLogic::setDialogSemaphore ( const bool _active)
inline

◆ setGameStarted()

void PlayerLogic::setGameStarted ( )
Here is the call graph for this function:

◆ setZoneId()

void PlayerLogic::setZoneId ( int _zoneId)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateZones()

void PlayerLogic::updateZones ( )
Here is the call graph for this function:

◆ zoneIdChanged

void PlayerLogic::zoneIdChanged ( int zoneId)
signal
Here is the caller graph for this function:

Member Data Documentation

◆ active

bool PlayerLogic::active
private

◆ cardsToDelete

QList<CardItem *> PlayerLogic::cardsToDelete
private

◆ conceded

bool PlayerLogic::conceded
private

◆ counters

QMap<int, CounterState *> PlayerLogic::counters
private

◆ deck

DeckList PlayerLogic::deck
private

◆ dialogSemaphore

bool PlayerLogic::dialogSemaphore
private

◆ game

AbstractGame* PlayerLogic::game
private

◆ graphicsItem

PlayerGraphicsItem* PlayerLogic::graphicsItem
private

◆ playerActions

PlayerActions* PlayerLogic::playerActions
private

◆ playerEventHandler

PlayerEventHandler* PlayerLogic::playerEventHandler
private

◆ playerInfo

PlayerInfo* PlayerLogic::playerInfo
private

◆ playerMenu

PlayerMenu* PlayerLogic::playerMenu
private

◆ zoneId

int PlayerLogic::zoneId
private

◆ zones

QMap<QString, CardZoneLogic *> PlayerLogic::zones
private

The documentation for this class was generated from the following files: