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

#include <game_state.h>

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

Public Slots

void incrementGameTime ()
void setGameTime (int _secondsElapsed)

Signals

void updateTimeElapsedLabel (QString newTime)
void gameStarted (bool resuming)
void gameStopped ()
void activePhaseChanged (int activePhase)
void activePlayerChanged (int playerId)

Public Member Functions

 GameState (AbstractGame *parent, int secondsElapsed, int hostId, bool isLocalGame, QList< AbstractClient * > clients, bool gameStateKnown, bool resuming, int currentPhase, bool gameClosed)
void setHostId (int _hostId)
QList< AbstractClient * > getClients () const
bool getIsLocalGame () const
bool isResuming () const
void setResuming (bool _resuming)
bool isGameStateKnown () const
int getCurrentPhase () const
void setCurrentPhase (int phase)
void setActivePlayer (int activePlayerId)
int getActivePlayer () const
void setGameClosed (bool closed)
bool isGameClosed () const
void onStartedChanged (bool _started)
void setGameStateKnown (bool known)
int getHostId () const

Private Attributes

QTimer * gameTimer
int secondsElapsed
int hostId
const bool isLocalGame
QList< AbstractClient * > clients
bool gameStateKnown
bool resuming
int currentPhase
int activePlayer
bool gameClosed

Constructor & Destructor Documentation

◆ GameState()

GameState::GameState ( AbstractGame * parent,
int secondsElapsed,
int hostId,
bool isLocalGame,
QList< AbstractClient * > clients,
bool gameStateKnown,
bool resuming,
int currentPhase,
bool gameClosed )
explicit
Here is the call graph for this function:

Member Function Documentation

◆ activePhaseChanged

void GameState::activePhaseChanged ( int activePhase)
signal
Here is the caller graph for this function:

◆ activePlayerChanged

void GameState::activePlayerChanged ( int playerId)
signal
Here is the caller graph for this function:

◆ gameStarted

void GameState::gameStarted ( bool resuming)
signal
Here is the caller graph for this function:

◆ gameStopped

void GameState::gameStopped ( )
signal
Here is the caller graph for this function:

◆ getActivePlayer()

int GameState::getActivePlayer ( ) const
inline

◆ getClients()

QList< AbstractClient * > GameState::getClients ( ) const
inline

◆ getCurrentPhase()

int GameState::getCurrentPhase ( ) const
inline

◆ getHostId()

int GameState::getHostId ( ) const
inline

◆ getIsLocalGame()

bool GameState::getIsLocalGame ( ) const
inline

◆ incrementGameTime

void GameState::incrementGameTime ( )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isGameClosed()

bool GameState::isGameClosed ( ) const
inline

◆ isGameStateKnown()

bool GameState::isGameStateKnown ( ) const
inline

◆ isResuming()

bool GameState::isResuming ( ) const
inline

◆ onStartedChanged()

void GameState::onStartedChanged ( bool _started)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setActivePlayer()

void GameState::setActivePlayer ( int activePlayerId)
inline
Here is the call graph for this function:

◆ setCurrentPhase()

void GameState::setCurrentPhase ( int phase)
inline
Here is the call graph for this function:

◆ setGameClosed()

void GameState::setGameClosed ( bool closed)
inline

◆ setGameStateKnown()

void GameState::setGameStateKnown ( bool known)
inline

◆ setGameTime

void GameState::setGameTime ( int _secondsElapsed)
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setHostId()

void GameState::setHostId ( int _hostId)
inline

◆ setResuming()

void GameState::setResuming ( bool _resuming)
inline

◆ updateTimeElapsedLabel

void GameState::updateTimeElapsedLabel ( QString newTime)
signal
Here is the caller graph for this function:

Member Data Documentation

◆ activePlayer

int GameState::activePlayer
private

◆ clients

QList<AbstractClient *> GameState::clients
private

◆ currentPhase

int GameState::currentPhase
private

◆ gameClosed

bool GameState::gameClosed
private

◆ gameStateKnown

bool GameState::gameStateKnown
private

◆ gameTimer

QTimer* GameState::gameTimer
private

◆ hostId

int GameState::hostId
private

◆ isLocalGame

const bool GameState::isLocalGame
private

◆ resuming

bool GameState::resuming
private

◆ secondsElapsed

int GameState::secondsElapsed
private

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