4#include <andromenda/Color.h>
5#include <foundation/math/Int2.h>
6#include <phosphorus/GameObject.h>
17 enum class CardColor :
wchar_t
26 static constexpr std::array<CardColor, 4> CardColors = {CardColor::Hearts, CardColor::Diamonds, CardColor::Spades,
33 enum class CardType :
wchar_t
51 static constexpr std::array<CardType, 13> CardTypes = {
52 CardType::Ace, CardType::N2, CardType::N3, CardType::N4, CardType::N5, CardType::N6, CardType::N7,
53 CardType::N8, CardType::N9, CardType::N10, CardType::Jack, CardType::Queen, CardType::King};
63 friend class CardStack;
64 friend struct CardInteraction;
82 GameObject *
clone()
override;
105 ~Card()
override =
default;
107 Card(
const String &identifier);
109 Card(
const CardType &type,
const CardColor &color);
119 [[nodiscard]] CardStack *
GetStack()
const;
Represents a playing card in a game. This class defines a card with properties such as color,...
Definition Card.h:61
GameObject * clone() override
Definition Card.cpp:20
bool m_IsEmpty
Indicates if the card is empty.
Definition Card.h:69
CardStack * GetStack() const
Gets the stack the card belongs to.
Definition Card.cpp:61
Phosphorus::BoolParameter Flipped
Whether the card is flipped.
Definition Card.h:101
String GetIdentifer() const override
Definition Card.cpp:22
CardStack * m_Stack
The stack this card belongs to.
Definition Card.h:74
enum Color GetTint() const
Gets the tint color of the card.
Definition Card.cpp:63
bool m_Dirty
Whether the card's state has changed.
Definition Card.h:79
Phosphorus::EnumParameter< CardType > Type
The card's type.
Definition Card.h:96
Phosphorus::EnumParameter< CardColor > Color
The card's color.
Definition Card.h:91
Represents a stack of cards in the game.
Definition Deck.h:14
Represents a deck of cards, including all stacks.
Definition Deck.h:78
Templated enum parameter. Derived from BaseEnumParameter.
Definition GameObject.h:216
Represents named set of parameters which can be serialized.
Definition GameObject.h:274
Represents a mutable sequence of characters, providing various member functions for string manipulati...
Definition String.h:16