GigaPasjans
Loading...
Searching...
No Matches
Game::Deck Class Reference

Represents a deck of cards, including all stacks. More...

#include <Deck.h>

Collaboration diagram for Game::Deck:

Public Member Functions

 Deck ()=default
 Constructs an empty deck.
 
 ~Deck ()
 Destructor for the deck.
 
void RegisterDeck (Phosphorus::GameObjectRegistry *registry) const
 Registers the deck and its stacks to a registry.
 
bool Solve ()
 Attempts to solve deck (old solver).
 
bool IsAllFlipped ()
 Checks whether all cards are flipped.
 
bool EnsureSolvable (int32 *moves=nullptr)
 Tries to solve deck.
 

Static Public Member Functions

static Deck Random (bool useSeed=false, int32 seed=0)
 Creates a deck with cards in random order.
 
static Deck Solved ()
 Creates a solved deck with cards in right order.
 
static int32 SolvableLongMode ()
 Returns a seed for a solvable deck.
 
static Deck Load (Phosphorus::GameObjectRegistry *registry)
 Loads a deck from a game object registry.
 

Public Attributes

CardStackStock
 Pointer to the stock card stack.
 
std::array< CardStack *, TABLEAU_STACKS > Tableau
 Array of tableau card stacks.
 
std::array< CardStack *, TABLEAU_FOUNDATIONS > Foundations
 Array of foundation card stacks.
 

Friends

class GameplayScreen
 

Detailed Description

Represents a deck of cards, including all stacks.


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