GigaPasjans
Loading...
Searching...
No Matches
Game::StockNextCardInteraction Struct Reference

Represents drawing the next card from the stock pile. More...

#include <InteractionManager.h>

Inheritance diagram for Game::StockNextCardInteraction:
Collaboration diagram for Game::StockNextCardInteraction:

Public Member Functions

void Do () override
 Executes the interaction.
 
void Undo () override
 Reverts the interaction.
 
void Serialize (nlohmann::json &obj) override
 Serializes the stock interaction to JSON.
 

Static Public Member Functions

static Card * GetCard ()
 Gets the currently selected card from the stock.
 
static int32 GetStockSize ()
 Returns the current size of the stock stack.
 
static StockNextCardInteraction * Load (nlohmann::json &obj)
 Loads a stock interaction from JSON.
 

Public Attributes

int32 Index
 Index of the card before the draw.
 
int32 NewIndex
 Index of the card after the draw.
 
- Public Attributes inherited from Game::IInteraction
InteractionType Type
 Type of the interaction.
 

Static Public Attributes

static int32 StackIndex = 0
 Current index in the stock pile.
 

Detailed Description

Represents drawing the next card from the stock pile.

Member Function Documentation

◆ Do()

void Game::StockNextCardInteraction::Do ( )
overridevirtual

Executes the interaction.

Reimplemented from Game::IInteraction.

◆ Serialize()

void Game::StockNextCardInteraction::Serialize ( nlohmann::json & obj)
overridevirtual

Serializes the stock interaction to JSON.

Reimplemented from Game::IInteraction.

◆ Undo()

void Game::StockNextCardInteraction::Undo ( )
overridevirtual

Reverts the interaction.

Reimplemented from Game::IInteraction.


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