#ifndef DYNAMIC_PROGRAM_DOWNLOAD_H #define DYNAMIC_PROGRAM_DOWNLOAD_H #include #include #include #include #include "game_interface.h" namespace Download { std::optional download_game_json(int game_id); std::optional open_game_json(char const *filename); /** * @brief Create game object from given source. * @param game_id Id to download from hanab.live. * @param score_goal What score counts as a win for this game. If left empty, the maximum score is inserted. * @return Game state * */ Hanabi::Game get_game(int game_id, std::optional score_goal); /** * @brief Create game object from given source. * @param filename Filename with a json specification of the game in hanab.live format. * @param score_goal What score counts as a win for this game. If left empty, the maximum score is inserted. * @return Game state * */ Hanabi::Game get_game(std::string const & filename, std::optional score_goal); } // namespace Download #endif // DYNAMIC_PROGRAM_DOWNLOAD_H