diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2023-05-03 14:09:40 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2023-05-03 14:09:40 -0400 |
commit | dc4a14397ae226d91041389c2a47993f9c22f83d (patch) | |
tree | e881fcac382d53961899bd60565ef77422101f6d /game_data.h | |
parent | 02c331f4e766558bba580d5b7db883357be005d5 (diff) | |
download | lingo-ap-tracker-dc4a14397ae226d91041389c2a47993f9c22f83d.tar.gz lingo-ap-tracker-dc4a14397ae226d91041389c2a47993f9c22f83d.tar.bz2 lingo-ap-tracker-dc4a14397ae226d91041389c2a47993f9c22f83d.zip |
Added painting shuffle support
Diffstat (limited to 'game_data.h')
-rw-r--r-- | game_data.h | 13 |
1 files changed, 13 insertions, 0 deletions
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 { | |||
45 | struct Exit { | 45 | struct Exit { |
46 | int destination_room; | 46 | int destination_room; |
47 | std::optional<int> door; | 47 | std::optional<int> door; |
48 | bool painting = false; | ||
49 | }; | ||
50 | |||
51 | struct PaintingExit { | ||
52 | std::string id; | ||
53 | std::optional<int> door; | ||
48 | }; | 54 | }; |
49 | 55 | ||
50 | struct Room { | 56 | struct Room { |
51 | std::string name; | 57 | std::string name; |
52 | std::vector<Exit> exits; | 58 | std::vector<Exit> exits; |
59 | std::vector<PaintingExit> paintings; | ||
53 | }; | 60 | }; |
54 | 61 | ||
55 | struct Location { | 62 | struct Location { |
@@ -87,6 +94,10 @@ class GameData { | |||
87 | 94 | ||
88 | const Panel& GetPanel(int panel_id) const { return panels_.at(panel_id); } | 95 | const Panel& GetPanel(int panel_id) const { return panels_.at(panel_id); } |
89 | 96 | ||
97 | int GetRoomForPainting(const std::string& painting_id) const { | ||
98 | return room_by_painting_.at(painting_id); | ||
99 | } | ||
100 | |||
90 | private: | 101 | private: |
91 | int AddOrGetRoom(std::string room); | 102 | int AddOrGetRoom(std::string room); |
92 | int AddOrGetDoor(std::string room, std::string door); | 103 | int AddOrGetDoor(std::string room, std::string door); |
@@ -102,6 +113,8 @@ class GameData { | |||
102 | std::map<std::string, int> door_by_id_; | 113 | std::map<std::string, int> door_by_id_; |
103 | std::map<std::string, int> panel_by_id_; | 114 | std::map<std::string, int> panel_by_id_; |
104 | std::map<std::string, int> area_by_id_; | 115 | std::map<std::string, int> area_by_id_; |
116 | |||
117 | std::map<std::string, int> room_by_painting_; | ||
105 | }; | 118 | }; |
106 | 119 | ||
107 | const GameData& GetGameData(); | 120 | const GameData& GetGameData(); |