aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-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");