diff options
| author | thecharlesblake | 2018-01-09 08:56:01 +0000 |
|---|---|---|
| committer | thecharlesblake | 2018-01-09 08:56:01 +0000 |
| commit | 077c56fbee736d9c597d9735229a1f625be46fe0 (patch) | |
| tree | 386cc5b362af436cd7561fc50daa1e08eea9c1ca /src | |
| parent | Add game state setup for stock-tableau & 2 deck (diff) | |
| download | metasol-077c56fbee736d9c597d9735229a1f625be46fe0.tar.gz metasol-077c56fbee736d9c597d9735229a1f625be46fe0.zip | |
Add state printing for stock-tableau deal
Diffstat (limited to 'src')
| -rw-r--r-- | src/main/input-output/output/state_printer.cpp | 11 |
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"); |
