Cockatrice 2025-11-30-Development-2.11.0-beta.38
A cross-platform virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
Server_CardZone Class Reference

#include <server_cardzone.h>

Collaboration diagram for Server_CardZone:
[legend]

Public Member Functions

 Server_CardZone (Server_AbstractPlayer *_player, const QString &_name, bool _has_coords, ServerInfo_Zone::ZoneType _type)
 ~Server_CardZone ()
const QList< Server_Card * > & getCards () const
int removeCard (Server_Card *card)
int removeCard (Server_Card *card, bool &wasLookedAt)
Server_CardgetCard (int id, int *position=nullptr, bool remove=false)
int getCardsBeingLookedAt () const
void setCardsBeingLookedAt (int _cardsBeingLookedAt)
bool isCardAtPosLookedAt (int pos) const
bool hasCoords () const
ServerInfo_Zone::ZoneType getType () const
QString getName () const
Server_AbstractPlayergetPlayer () const
void getInfo (ServerInfo_Zone *info, Server_AbstractParticipant *recipient, bool omniscient)
int getFreeGridColumn (int x, int y, const QString &cardName, bool dontStackSameName) const
bool isColumnEmpty (int x, int y) const
bool isColumnStacked (int x, int y) const
void fixFreeSpaces (GameEventStorage &ges)
void moveCardInRow (GameEventStorage &ges, Server_Card *card, int x, int y)
void insertCard (Server_Card *card, int x, int y)
void updateCardCoordinates (Server_Card *card, int oldX, int oldY)
void shuffle (int start=0, int end=-1)
void clear ()
void addWritePermission (int playerId)
const QSet< int > & getPlayersWithWritePermission () const
bool getAlwaysRevealTopCard () const
void setAlwaysRevealTopCard (bool _alwaysRevealTopCard)
bool getAlwaysLookAtTopCard () const
void setAlwaysLookAtTopCard (bool _alwaysLookAtTopCard)

Private Member Functions

void removeCardFromCoordMap (Server_Card *card, int oldX, int oldY)
void insertCardIntoCoordMap (Server_Card *card, int x, int y)

Private Attributes

Server_AbstractPlayerplayer
QString name
bool has_coords
ServerInfo_Zone::ZoneType type
int cardsBeingLookedAt
QSet< int > playersWithWritePermission
bool alwaysRevealTopCard
bool alwaysLookAtTopCard
QList< Server_Card * > cards
QMap< int, QMap< int, Server_Card * > > coordinateMap
QMap< int, QMultiMap< QString, int > > freePilesMap
QMap< int, int > freeSpaceMap

Constructor & Destructor Documentation

◆ Server_CardZone()

Server_CardZone::Server_CardZone ( Server_AbstractPlayer * _player,
const QString & _name,
bool _has_coords,
ServerInfo_Zone::ZoneType _type )

◆ ~Server_CardZone()

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

Member Function Documentation

◆ addWritePermission()

void Server_CardZone::addWritePermission ( int playerId)
Here is the caller graph for this function:

◆ clear()

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

◆ fixFreeSpaces()

void Server_CardZone::fixFreeSpaces ( GameEventStorage & ges)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAlwaysLookAtTopCard()

bool Server_CardZone::getAlwaysLookAtTopCard ( ) const
inlinenodiscard
Here is the caller graph for this function:

◆ getAlwaysRevealTopCard()

bool Server_CardZone::getAlwaysRevealTopCard ( ) const
inlinenodiscard
Here is the caller graph for this function:

◆ getCard()

Server_Card * Server_CardZone::getCard ( int id,
int * position = nullptr,
bool remove = false )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCards()

const QList< Server_Card * > & Server_CardZone::getCards ( ) const
inlinenodiscard
Here is the caller graph for this function:

◆ getCardsBeingLookedAt()

int Server_CardZone::getCardsBeingLookedAt ( ) const
inlinenodiscard
Here is the caller graph for this function:

◆ getFreeGridColumn()

int Server_CardZone::getFreeGridColumn ( int x,
int y,
const QString & cardName,
bool dontStackSameName ) const
nodiscard
Here is the caller graph for this function:

◆ getInfo()

void Server_CardZone::getInfo ( ServerInfo_Zone * info,
Server_AbstractParticipant * recipient,
bool omniscient )

◆ getName()

QString Server_CardZone::getName ( ) const
inlinenodiscard
Here is the caller graph for this function:

◆ getPlayer()

Server_AbstractPlayer * Server_CardZone::getPlayer ( ) const
inlinenodiscard
Here is the caller graph for this function:

◆ getPlayersWithWritePermission()

const QSet< int > & Server_CardZone::getPlayersWithWritePermission ( ) const
inlinenodiscard
Here is the caller graph for this function:

◆ getType()

ServerInfo_Zone::ZoneType Server_CardZone::getType ( ) const
inlinenodiscard
Here is the caller graph for this function:

◆ hasCoords()

bool Server_CardZone::hasCoords ( ) const
inlinenodiscard
Here is the caller graph for this function:

◆ insertCard()

void Server_CardZone::insertCard ( Server_Card * card,
int x,
int y )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ insertCardIntoCoordMap()

void Server_CardZone::insertCardIntoCoordMap ( Server_Card * card,
int x,
int y )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isCardAtPosLookedAt()

bool Server_CardZone::isCardAtPosLookedAt ( int pos) const
nodiscard
Here is the caller graph for this function:

◆ isColumnEmpty()

bool Server_CardZone::isColumnEmpty ( int x,
int y ) const
nodiscard
Here is the caller graph for this function:

◆ isColumnStacked()

bool Server_CardZone::isColumnStacked ( int x,
int y ) const
nodiscard
Here is the caller graph for this function:

◆ moveCardInRow()

void Server_CardZone::moveCardInRow ( GameEventStorage & ges,
Server_Card * card,
int x,
int y )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeCard() [1/2]

int Server_CardZone::removeCard ( Server_Card * card)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeCard() [2/2]

int Server_CardZone::removeCard ( Server_Card * card,
bool & wasLookedAt )
Here is the call graph for this function:

◆ removeCardFromCoordMap()

void Server_CardZone::removeCardFromCoordMap ( Server_Card * card,
int oldX,
int oldY )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setAlwaysLookAtTopCard()

void Server_CardZone::setAlwaysLookAtTopCard ( bool _alwaysLookAtTopCard)
inline
Here is the caller graph for this function:

◆ setAlwaysRevealTopCard()

void Server_CardZone::setAlwaysRevealTopCard ( bool _alwaysRevealTopCard)
inline
Here is the caller graph for this function:

◆ setCardsBeingLookedAt()

void Server_CardZone::setCardsBeingLookedAt ( int _cardsBeingLookedAt)
inline
Here is the caller graph for this function:

◆ shuffle()

void Server_CardZone::shuffle ( int start = 0,
int end = -1 )
Here is the caller graph for this function:

◆ updateCardCoordinates()

void Server_CardZone::updateCardCoordinates ( Server_Card * card,
int oldX,
int oldY )
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ alwaysLookAtTopCard

bool Server_CardZone::alwaysLookAtTopCard
private

◆ alwaysRevealTopCard

bool Server_CardZone::alwaysRevealTopCard
private

◆ cards

QList<Server_Card *> Server_CardZone::cards
private

◆ cardsBeingLookedAt

int Server_CardZone::cardsBeingLookedAt
private

◆ coordinateMap

QMap<int, QMap<int, Server_Card *> > Server_CardZone::coordinateMap
private

◆ freePilesMap

QMap<int, QMultiMap<QString, int> > Server_CardZone::freePilesMap
private

◆ freeSpaceMap

QMap<int, int> Server_CardZone::freeSpaceMap
private

◆ has_coords

bool Server_CardZone::has_coords
private

◆ name

QString Server_CardZone::name
private

◆ player

Server_AbstractPlayer* Server_CardZone::player
private

◆ playersWithWritePermission

QSet<int> Server_CardZone::playersWithWritePermission
private

◆ type

ServerInfo_Zone::ZoneType Server_CardZone::type
private

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