diff options
| author | thecharlesblake | 2017-12-31 11:47:13 +0000 |
|---|---|---|
| committer | thecharlesblake | 2017-12-31 11:47:13 +0000 |
| commit | fce918cfbc3c55eca2f3fa5efb93db99f3673096 (patch) | |
| tree | daac410dce37281265e2cd6e36deef3e5c44ed12 /src/main/game/card.h | |
| parent | Make game state representation efficient (diff) | |
| download | metasol-fce918cfbc3c55eca2f3fa5efb93db99f3673096.tar.gz metasol-fce918cfbc3c55eca2f3fa5efb93db99f3673096.zip | |
Card efficient implementation fix
Diffstat (limited to 'src/main/game/card.h')
| -rw-r--r-- | src/main/game/card.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/game/card.h b/src/main/game/card.h index fdb0b12..cc5a993 100644 --- a/src/main/game/card.h +++ b/src/main/game/card.h @@ -10,7 +10,8 @@ class card { public: - enum class suit_t : uint8_t {Clubs, Diamonds, Hearts, Spades}; + enum class suit_t {Clubs, Diamonds, Hearts, Spades}; + enum class colour_t {Black, Red}; typedef uint8_t rank_t; // A card can either be created using two int values (rank & suit), or @@ -19,13 +20,14 @@ public: card(const char*); suit_t get_suit() const; + colour_t get_colour() const; rank_t get_rank() const; private: static suit_t suit_from_str(const char* c); static rank_t rank_from_str(const char* c); - suit_t suit : 4; + suit_t suit; rank_t rank : 4; }; |
