Started working on c++
This commit is contained in:
27
shenzhen_solitaire/c++/include/board.hpp
Normal file
27
shenzhen_solitaire/c++/include/board.hpp
Normal file
@@ -0,0 +1,27 @@
|
||||
#include <array>
|
||||
#include <optional>
|
||||
|
||||
namespace solitaire {
|
||||
class Card {
|
||||
bool isNormalCard();
|
||||
bool isSpecialCard();
|
||||
};
|
||||
|
||||
struct BunkerField{
|
||||
Card card;
|
||||
bool empty;
|
||||
bool closed;
|
||||
};
|
||||
|
||||
class Board {
|
||||
public:
|
||||
static constexpr int MAX_ROW_SIZE = 13;
|
||||
static constexpr int MAX_COLUMN_SIZE = 8;
|
||||
|
||||
private:
|
||||
std::array<std::array<Card, MAX_COLUMN_SIZE>, MAX_ROW_SIZE> field;
|
||||
std::array<BunkerField, 3> bunker;
|
||||
std::array<std::optional<Card>, 3> goal;
|
||||
bool flower_gone;
|
||||
};
|
||||
} // namespace solitaire
|
||||
Reference in New Issue
Block a user