diff options
Diffstat (limited to 'src/game_of_life.cpp')
-rw-r--r-- | src/game_of_life.cpp | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/src/game_of_life.cpp b/src/game_of_life.cpp index 2d6d5ee..c0f8630 100644 --- a/src/game_of_life.cpp +++ b/src/game_of_life.cpp @@ -1,35 +1,11 @@ -#include "bootstrap.hpp" -#include "interfaces/argument_parser.hpp" #include "interfaces/engine.hpp" -#include "interfaces/randomization.hpp" - -#include <getopt.h> -#include <vector> -const std::vector<option> options = { - option({"seed", required_argument, nullptr, 's'}), - option({"help", no_argument, nullptr, 'h'}), - option({nullptr, 0, nullptr, 0})}; +#include "bootstrap.hpp" -auto main(int argc, char *argv[]) noexcept -> int +auto main() noexcept -> int { auto container = bootstrap(); - auto argument_parser = container.get<IArgumentParser>(); - - auto parsed_arguments = argument_parser->parse(options, "s:h", argc, argv); - - if (parsed_arguments.random_gen == nullptr) - { - auto seed_generator = container.get<ISeedGenerator>(); - - auto random_number_generator_factory = - container.get<IRandomNumberGeneratorFactory>(); - - parsed_arguments.random_gen = - random_number_generator_factory(seed_generator->random_seed()); - } - auto engine = container.get<ICLIGameEngine>(); engine->start(); |