aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/game_state.cpp11
-rw-r--r--src/main/game_state.h1
2 files changed, 12 insertions, 0 deletions
diff --git a/src/main/game_state.cpp b/src/main/game_state.cpp
index 2dd1ca8..90a7381 100644
--- a/src/main/game_state.cpp
+++ b/src/main/game_state.cpp
@@ -181,6 +181,10 @@ ostream& game_state::print(ostream& stream) const {
print_header(stream, "Foundations");
print_foundations(stream);
}
+ if (rules.cells) {
+ print_header(stream, "Cells");
+ print_cells(stream);
+ }
if (rules.tableau_pile_count > 0) {
print_header(stream, "Tableau Piles");
print_tableau_piles(stream);
@@ -208,6 +212,13 @@ void game_state::print_foundations(ostream& stream) const {
<< foundations[3] << "\n";
}
+void game_state::print_cells(ostream& stream) const {
+ for (pile cell : cells) {
+ if (!cell.empty()) stream << cells[0] << "\t";
+ }
+ stream << "\n";
+}
+
void game_state::print_tableau_piles(ostream& stream) const {
bool empty_row = false;
vector<card>::size_type row_idx = 0;
diff --git a/src/main/game_state.h b/src/main/game_state.h
index bb98ee3..97a1bec 100644
--- a/src/main/game_state.h
+++ b/src/main/game_state.h
@@ -36,6 +36,7 @@ private:
void print_header(std::ostream&, const char*) const;
void print_foundations(std::ostream&) const;
+ void print_cells(std::ostream&) const;
void print_tableau_piles(std::ostream&) const;
void print_hole(std::ostream&) const;