1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
//
// Created by thecharlesblake on 10/28/17.
//
#ifndef SOLVITAIRE_SOL_RULES_H
#define SOLVITAIRE_SOL_RULES_H
#include <string>
#include <vector>
#include <boost/optional.hpp>
#include "card.h"
#include "../../../lib/rapidjson/document.h"
struct sol_rules {
sol_rules();
// Tableau policies
enum class build_policy {
NO_BUILD,
SAME_SUIT,
RED_BLACK,
ANY_SUIT
};
enum class spaces_policy {
NO_BUILD,
KINGS,
ANY,
AUTO_RESERVE_THEN_WASTE,
AUTO_WASTE_THEN_STOCK
};
enum class accordion_policy {
SAME_RANK,
SAME_SUIT,
RED_BLACK,
ANY_SUIT
};
enum class stock_deal_type {
WASTE,
TABLEAU_PILES
};
enum class face_up_policy {
ALL,
TOP_CARDS
};
enum class direction {
LEFT,
RIGHT,
BOTH
};
enum class built_group_type {
YES,
NO,
WHOLE_PILE
};
enum class foundations_init_type {
NONE,
ONE,
ALL
};
uint8_t tableau_pile_count;
build_policy build_pol;
spaces_policy spaces_pol;
built_group_type move_built_group;
build_policy built_group_pol;
bool tableau_wraps;
bool two_decks;
uint8_t max_rank;
bool hole;
bool foundations_present;
foundations_init_type foundations_init_cards;
boost::optional<card::rank_t> foundations_base;
bool foundations_removable;
bool foundations_only_comp_piles;
bool diagonal_deal;
uint8_t cells;
uint8_t cells_pre_filled;
uint8_t stock_size;
stock_deal_type stock_deal_t;
uint8_t stock_deal_count;
bool stock_redeal;
uint8_t reserve_size;
bool reserve_stacked;
face_up_policy face_up;
uint8_t sequence_count;
direction sequence_direction;
build_policy sequence_build_pol;
bool sequence_fixed_suit;
uint8_t accordion_size;
std::vector<std::pair<direction, uint8_t>> accordion_moves;
std::vector<accordion_policy> accordion_pol;
};
#endif //SOLVITAIRE_SOL_RULES_H
|