aboutsummaryrefslogtreecommitdiff
path: root/src/main/input-output/output
diff options
context:
space:
mode:
authorthecharlesblake2018-01-09 08:56:01 +0000
committerthecharlesblake2018-01-09 08:56:01 +0000
commit077c56fbee736d9c597d9735229a1f625be46fe0 (patch)
tree386cc5b362af436cd7561fc50daa1e08eea9c1ca /src/main/input-output/output
parentAdd game state setup for stock-tableau & 2 deck (diff)
downloadmetasol-077c56fbee736d9c597d9735229a1f625be46fe0.tar.gz
metasol-077c56fbee736d9c597d9735229a1f625be46fe0.zip

Add state printing for stock-tableau deal

Diffstat (limited to 'src/main/input-output/output')
-rw-r--r--src/main/input-output/output/state_printer.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/main/input-output/output/state_printer.cpp b/src/main/input-output/output/state_printer.cpp
index cf9f09e..bfb6c7d 100644
--- a/src/main/input-output/output/state_printer.cpp
+++ b/src/main/input-output/output/state_printer.cpp
@@ -6,6 +6,8 @@
using namespace std;
+typedef sol_rules::stock_deal_type sdt;
+
ostream& state_printer::print(ostream& stream, const game_state& gs) {
if (gs.rules.foundations) {
state_printer::print_header(stream, "Foundations");
@@ -28,8 +30,13 @@ ostream& state_printer::print(ostream& stream, const game_state& gs) {
state_printer::print_piles(stream, gs.reserve, gs);
}
if (gs.rules.stock_size > 0) {
- state_printer::print_header(stream, "Stock | Waste");
- state_printer::print_piles(stream, {gs.stock, gs.waste}, gs);
+ if (gs.rules.stock_deal_t == sdt::WASTE) {
+ state_printer::print_header(stream, "Stock | Waste");
+ state_printer::print_piles(stream, {gs.stock, gs.waste}, gs);
+ } else {
+ state_printer::print_header(stream, "Stock");
+ state_printer::print_piles(stream, {gs.stock}, gs);
+ }
}
if (gs.rules.hole) {
state_printer::print_header(stream, "Hole Card");