diff options
Diffstat (limited to 'src/main/input-output/output/state_printer.cpp')
| -rw-r--r-- | src/main/input-output/output/state_printer.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/main/input-output/output/state_printer.cpp b/src/main/input-output/output/state_printer.cpp index 67702e2..f673319 100644 --- a/src/main/input-output/output/state_printer.cpp +++ b/src/main/input-output/output/state_printer.cpp @@ -43,6 +43,10 @@ ostream& state_printer::print(ostream& stream, const game_state& gs) { state_printer::print_header(stream, "Hole Card"); state_printer::print_top_of_pile(stream, gs.hole, gs); } + if (gs.rules.sequence_count > 0) { + state_printer::print_header(stream, "Sequences"); + state_printer::print_sequences(stream, gs.sequences, gs); + } return stream << "==================================="; } @@ -90,6 +94,21 @@ void state_printer::print_piles(ostream& stream, } } +void state_printer::print_sequences(ostream& stream, + const vector<pile::ref>& seq_rs, + const game_state& gs) { + for (auto s : seq_rs) { + stream << "\n"; + auto& pile = gs.piles[s]; + for (auto i = pile.size(); i --> 0 ;) { + print_card(stream, pile[i]); + stream << " "; + } + stream << "\n"; + } + stream << "\n"; +} + void state_printer::print_top_of_piles(ostream& stream, const vector<pile::ref>& vp, const game_state& gs) { |
