diff options
| author | thecharlesblake | 2018-10-13 22:32:19 +0100 |
|---|---|---|
| committer | thecharlesblake | 2018-10-13 22:32:19 +0100 |
| commit | 23b250bf83739772ff54d9ba505f1fafa2be193b (patch) | |
| tree | f5ec04f085779c03045fab051eb0bb519d4bfd96 /src/main/main.cpp | |
| parent | Add deal-print cmdln option (diff) | |
| download | metasol-23b250bf83739772ff54d9ba505f1fafa2be193b.tar.gz metasol-23b250bf83739772ff54d9ba505f1fafa2be193b.zip | |
Add json printing of initial deal
Diffstat (limited to 'src/main/main.cpp')
| -rw-r--r-- | src/main/main.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/main.cpp b/src/main/main.cpp index 808ee78..faed0ca 100644 --- a/src/main/main.cpp +++ b/src/main/main.cpp @@ -53,6 +53,12 @@ int main(int argc, const char* argv[]) { const optional<sol_rules> rules = gen_rules(clh); if (!rules) return EXIT_FAILURE; + if (clh.get_deal_only()) { + game_state gs(*rules, clh.get_random_deal(), game_state::streamliner_options::NONE); + json_helper::print_game_state_as_json(gs); + return EXIT_SUCCESS; + } + // If the user has asked for a solvability percentage, calculates it if (clh.get_solvability() > 0) { solvability_calc solv_c(*rules, clh.get_cache_capacity()); |
