From 91286f9dbb85fc2805345ba72468d5f145228be8 Mon Sep 17 00:00:00 2001 From: HampusM Date: Wed, 16 Feb 2022 19:31:24 +0100 Subject: refactor: create app class & simplify app options --- src/app/options.hpp | 32 +++++--------------------------- 1 file changed, 5 insertions(+), 27 deletions(-) (limited to 'src/app/options.hpp') diff --git a/src/app/options.hpp b/src/app/options.hpp index 0023283..7e691e3 100644 --- a/src/app/options.hpp +++ b/src/app/options.hpp @@ -7,32 +7,10 @@ #include #include -/** - * Application options. - */ -class AppOptions +struct AppOptions { -public: - AppOptions() = default; - - [[nodiscard]] std::shared_ptr maze_bounds() const; - void maze_bounds(std::shared_ptr maze_bounds); - - [[nodiscard]] std::shared_ptr start_coords() const; - void start_coords(std::shared_ptr start_coords); - - [[nodiscard]] std::string_view wall() const; - void wall(std::string_view wall); - - [[nodiscard]] std::shared_ptr random_gen() const; - void random_gen(std::shared_ptr random_gen); - -private: - std::shared_ptr _maze_bounds = nullptr; - - std::shared_ptr _start_coords = nullptr; - - std::string_view _wall; - - std::shared_ptr _random_gen = nullptr; + std::shared_ptr maze_bounds; + std::shared_ptr start_coords; + std::string_view wall; + std::shared_ptr random_gen; }; -- cgit v1.2.3-18-g5258