diff options
| author | Charlie Blake | 2017-11-13 09:52:23 +0000 |
|---|---|---|
| committer | GitHub | 2017-11-13 09:52:23 +0000 |
| commit | 96f9d446750e07c039ce5d482c92c464593c5bc9 (patch) | |
| tree | 5731e7eee2c041166479585daab804bc6d8e445c /src/main/game/card.h | |
| parent | Merge pull request #19 from thecharlesblake/canfield (diff) | |
| parent | Refactor solver (diff) | |
| download | metasol-96f9d446750e07c039ce5d482c92c464593c5bc9.tar.gz metasol-96f9d446750e07c039ce5d482c92c464593c5bc9.zip | |
Merge pull request #20 from thecharlesblake/initial-code-cleanup
Initial code cleanup
Diffstat (limited to 'src/main/game/card.h')
| -rw-r--r-- | src/main/game/card.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/main/game/card.h b/src/main/game/card.h new file mode 100644 index 0000000..1cac344 --- /dev/null +++ b/src/main/game/card.h @@ -0,0 +1,31 @@ +// +// Created by thecharlesblake on 10/11/17. +// + +#ifndef SOLITAIRE_PIP_CARD_H +#define SOLITAIRE_PIP_CARD_H + +#include <string> +#include <map> + +class card { +public: + // A card can either be created using two int values (rank & suit), or + // using a string (e.g. "AS") + card(int, int); + card(const char*); + + int get_rank() const; + char get_suit() const; + int get_suit_val() const; + +private: + int rank; + int suit; +}; + +std::ostream & operator<<(std::ostream &, card const &); +bool operator==(const card&, const card&); + + +#endif //SOLITAIRE_PIP_CARD_H |
