aboutsummaryrefslogtreecommitdiff
path: root/src/main/game/card.h
diff options
context:
space:
mode:
authorthecharlesblake2018-01-03 12:30:14 +0000
committerthecharlesblake2018-01-03 12:30:14 +0000
commit77a7aeba7854d15b140cc6dc3c69b15ed5f3b936 (patch)
tree70b3b8315646ed38000a1627ec3f3efe20f31f92 /src/main/game/card.h
parentUpdate idea to python3 (diff)
downloadmetasol-77a7aeba7854d15b140cc6dc3c69b15ed5f3b936.tar.gz
metasol-77a7aeba7854d15b140cc6dc3c69b15ed5f3b936.zip

Major refactor, putting pile logic into game_state

Much of the logic that was in the pile class was beginning to seem out of place. A lot of the rules have fairly arbitrary interactons between piles, which weren’t best represented in the pile classes themselves, which were getting unweildy and inefficient. Hence, much of this logic has been moved to the game state class.

Diffstat (limited to 'src/main/game/card.h')
-rw-r--r--src/main/game/card.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/game/card.h b/src/main/game/card.h
index cc5a993..9c43350 100644
--- a/src/main/game/card.h
+++ b/src/main/game/card.h
@@ -14,6 +14,8 @@ public:
enum class colour_t {Black, Red};
typedef uint8_t rank_t;
+ static suit_t to_suit(uint8_t);
+
// A card can either be created using two int values (rank & suit), or
// using a string (e.g. "AS")
card(suit_t, rank_t);