From dc4a14397ae226d91041389c2a47993f9c22f83d Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Wed, 3 May 2023 14:09:40 -0400 Subject: Added painting shuffle support --- game_data.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'game_data.h') diff --git a/game_data.h b/game_data.h index 6ee277b..981f56f 100644 --- a/game_data.h +++ b/game_data.h @@ -45,11 +45,18 @@ struct Door { struct Exit { int destination_room; std::optional door; + bool painting = false; +}; + +struct PaintingExit { + std::string id; + std::optional door; }; struct Room { std::string name; std::vector exits; + std::vector paintings; }; struct Location { @@ -87,6 +94,10 @@ class GameData { const Panel& GetPanel(int panel_id) const { return panels_.at(panel_id); } + int GetRoomForPainting(const std::string& painting_id) const { + return room_by_painting_.at(painting_id); + } + private: int AddOrGetRoom(std::string room); int AddOrGetDoor(std::string room, std::string door); @@ -102,6 +113,8 @@ class GameData { std::map door_by_id_; std::map panel_by_id_; std::map area_by_id_; + + std::map room_by_painting_; }; const GameData& GetGameData(); -- cgit 1.4.1