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

Represents a playing card in a game. This class defines a card with properties such as color, type, and flip state. More...

#include <Card.h>

Inheritance diagram for Game::Card:
Collaboration diagram for Game::Card:

Public Member Functions

 Card (const String &identifier)
 
 Card (const CardType &type, const CardColor &color)
 
enum Color GetTint () const
 Gets the tint color of the card.
 
CardStackGetStack () const
 Gets the stack the card belongs to.
 
- Public Member Functions inherited from Phosphorus::GameObject
std::vector< IBaseParameter * > GetParameters () const
 Returns parameters list.
 
String GetUniqueId () const
 Returns GameObject unique id.
 

Public Attributes

Phosphorus::EnumParameter< CardColor > Color
 The card's color.
 
Phosphorus::EnumParameter< CardType > Type
 The card's type.
 
Phosphorus::BoolParameter Flipped
 Whether the card is flipped.
 

Protected Member Functions

GameObject * clone () override
 
String GetIdentifer () const override
 
- Protected Member Functions inherited from Phosphorus::GameObject
 GameObject (const String &identifier)
 
void addParameter (IBaseParameter *parameter)
 Adds parameter to the list.
 
IBaseParameterfindParameter (const String &name)
 Returns parameter with given name.
 
virtual void onPostLoad ()
 Event called after object load from file.
 
virtual void onPreSerialize ()
 Event called before object gets serialized.
 

Protected Attributes

bool m_IsEmpty = true
 Indicates if the card is empty.
 
CardStackm_Stack = nullptr
 The stack this card belongs to.
 
bool m_Dirty = false
 Whether the card's state has changed.
 
- Protected Attributes inherited from Phosphorus::GameObject
StringParameter m_Identifier
 Random GameObject identifier.
 

Friends

class CardStack
 
struct CardInteraction
 

Detailed Description

Represents a playing card in a game. This class defines a card with properties such as color, type, and flip state.

Member Function Documentation

◆ clone()

Phosphorus::GameObject * Game::Card::clone ( )
overrideprotectedvirtual

◆ GetIdentifer()

String Game::Card::GetIdentifer ( ) const
nodiscardoverrideprotectedvirtual

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