#pragma once #include #include #include #include "backend/Dungeon.h" #include "backend/Player.h" class Location; class GameController { typedef void Cmd(std::string &); public: GameController(); virtual ~GameController() = default; private: void gameloop(); public: int main(); private: void cmd(std::string &); private: std::unique_ptr make_dungeon() noexcept; private: void cmdset_default(); void cmdset_death(); void cmdset_cheats(); private: std::unordered_map cmds; Cmd cmd_query; Cmd cmd_search; Cmd cmd_go; Cmd cmd_get; Cmd cmd_put; Cmd cmd_view; Cmd cmd_hit; Cmd cmd_equip; Cmd cmd_wait; Cmd cmd_use; Cmd cmd_help; Cmd cmd_cheat; Cmd cmd_quit; Cmd cmd_restart; Cmd cmd_give; private: std::unique_ptr dungeon = nullptr; bool playing = true; bool quit = false; };