diff options
Diffstat (limited to 'src/main')
| -rw-r--r-- | src/main/game/pile.cpp | 6 | ||||
| -rw-r--r-- | src/main/game/pile.h | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/main/game/pile.cpp b/src/main/game/pile.cpp index ba7c1b9..21eddc0 100644 --- a/src/main/game/pile.cpp +++ b/src/main/game/pile.cpp @@ -9,7 +9,11 @@ using namespace std; -pile::pile(std::vector<card> pv) : pile_vec(pv) {} +pile::pile(std::vector<card> pv) : pile_vec(pv) { +} + +pile::pile(std::initializer_list<card> il) : pile_vec(il) { +} card pile::top_card() const { assert(!empty()); diff --git a/src/main/game/pile.h b/src/main/game/pile.h index fb7bc38..411f890 100644 --- a/src/main/game/pile.h +++ b/src/main/game/pile.h @@ -13,9 +13,12 @@ class pile { public: - pile(std::vector<card>); typedef uint8_t size_type; + pile() = default; + pile(std::vector<card>); + pile(std::initializer_list<card>); + // Inspect card top_card() const; bool empty() const; |
