From 23b250bf83739772ff54d9ba505f1fafa2be193b Mon Sep 17 00:00:00 2001 From: thecharlesblake Date: Sat, 13 Oct 2018 22:32:19 +0100 Subject: Add json printing of initial deal --- src/main/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/main/main.cpp') 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 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()); -- cgit v1.2.1