#ifndef DYNAMIC_PROGRAM_DOWNLOAD_H #define DYNAMIC_PROGRAM_DOWNLOAD_H #include #include #include #include #include #include "game_state.h" #include "myassert.h" namespace Download { std::optional download_game_json(int game_id); std::optional open_game_json(const char *filename); /** * @brief Create game object from given source * @param game_spec Either an id to download from hanab.live or a filename with a json specification * @param score_goal What score counts as a win for this game. If left empty, the maximum score is inserted. * @return Game state * * If both turn and draw_pile_break are specified, the game skips until the specified turn or the first time the * draw pile hits the given size, whichever comes first * */ Hanabi::Game get_game(std::variant game_spec, std::optional score_goal); } // namespace Download #endif // DYNAMIC_PROGRAM_DOWNLOAD_H