aboutsummaryrefslogtreecommitdiff
path: root/solvitaire/src/main/game/pile.h
diff options
context:
space:
mode:
Diffstat (limited to 'solvitaire/src/main/game/pile.h')
m---------solvitaire0
-rw-r--r--solvitaire/src/main/game/pile.h53
2 files changed, 0 insertions, 53 deletions
diff --git a/solvitaire b/solvitaire
new file mode 160000
+Subproject b835e10bfb21a73b4f89e09ddeb400f41538483
diff --git a/solvitaire/src/main/game/pile.h b/solvitaire/src/main/game/pile.h
deleted file mode 100644
index 5ab2404..0000000
--- a/solvitaire/src/main/game/pile.h
+++ /dev/null
@@ -1,53 +0,0 @@
-//
-// Created by thecharlesblake on 10/28/17.
-//
-
-#ifndef SOLVITAIRE_PILE_H
-#define SOLVITAIRE_PILE_H
-
-#include <vector>
-#include <iterator>
-
-#include "sol_rules.h"
-#include "card.h"
-
-class pile {
- friend class hasher;
- friend class game_state;
- friend class cached_game_state;
-public:
- typedef uint8_t size_type;
- const static size_type max_size_type;
- typedef uint8_t ref;
-
- pile() = default;
- pile(std::vector<card>);
- pile(std::initializer_list<card>);
-
- // Inspect
- card top_card() const;
- bool empty() const;
- size_type size() const;
-
- // Indexes the vector, with the top card as index 0
- card& operator[] (size_type);
- card operator[] (size_type) const;
-
- friend bool operator==(const pile&, const pile&);
- friend bool operator!=(const pile&, const pile&);
- friend bool operator<(const pile&, const pile&);
- friend bool operator>(const pile&, const pile&);
- friend bool operator<=(const pile&, const pile&);
- friend bool operator>=(const pile&, const pile&);
-
- // Modify
- void place(card);
- card take();
-
-private:
- // Underlying vector
- std::vector<card> pile_vec;
-};
-
-
-#endif //SOLVITAIRE_PILE_H