5#include <foundation/Common.h>
40 constexpr Scoring(int32 stockToTableau, int32 stockToFoundation, int32 tableauToFoundation,
41 int32 foundationToTableau, int32 revealCard) :
53 static constexpr Scoring Microsoft() {
return {5, 10, 10, -15, 5}; }
58 static constexpr Scoring ClassicEasy() {
return {10, 15, 15, -5, 10}; }
63 static constexpr Scoring VegasStyle() {
return {0, 5, 5, -10, 5}; }
68 static constexpr Scoring SpeedRun() {
return {3, 8, 12, -5, 7}; }
73 static constexpr Scoring Hardcore() {
return {1, 5, 5, -25, 2}; }
78 static constexpr Scoring CustomBalanced() {
return {4, 10, 10, -10, 6}; }
83 static constexpr std::array<Scoring, 6> Table = {Microsoft(), ClassicEasy(), VegasStyle(),
84 SpeedRun(), Hardcore(), CustomBalanced()};
96 inline static Scoring m_Scoring = Scorings::Microsoft();
106 static void givePoints(
const std::vector<Card *> &cards,
CardStack *targetStack);
Represents a playing card in a game. This class defines a card with properties such as color,...
Definition Card.h:61
Represents a stack of cards in the game.
Definition Deck.h:14
Manages game rules, scoring, and win conditions.
Definition GameRulesEngine.h:91
static bool VerifyBulkCardInteraction(const std::vector< Card * > &cards, CardStack *targetStack)
Validates if a group of cards can be moved to the target stack.
Definition GameRulesEngine.cpp:89
static void SetScoring(const Scoring &scoring)
Sets the current scoring rule set.
Definition GameRulesEngine.cpp:127
static bool IsWin()
Checks whether current game state satisfies win conditions.
Definition GameRulesEngine.cpp:97
static bool VerifyCardInteraction(Card *card, CardStack *targetStack)
Validates if a card can be moved to the target stack.
Definition GameRulesEngine.cpp:47
static void CheckForWin()
Evaluates the game state and triggers win logic if necessary.
Definition GameRulesEngine.cpp:116
static const Scoring & GetScoring()
Gets the currently active scoring rule set.
Definition GameRulesEngine.cpp:129
Defines the point values for various game actions.
Definition GameRulesEngine.h:14
int32 StockToTableau
Points for moving a card from stock to tableau.
Definition GameRulesEngine.h:18
int32 FoundationToTableau
Points penalty for moving a card from foundation to tableau.
Definition GameRulesEngine.h:33
int32 RevealCard
Points for revealing a hidden card.
Definition GameRulesEngine.h:38
int32 StockToFoundation
Points for moving a card from stock to foundation.
Definition GameRulesEngine.h:23
int32 TableauToFoundation
Points for moving a card from tableau to foundation.
Definition GameRulesEngine.h:28