From 753e1142c0d87b0232dde2f39921f4d0a2055da3 Mon Sep 17 00:00:00 2001 From: Max Bradbury Date: Mon, 6 Apr 2020 20:34:35 +0100 Subject: [PATCH] a room's endings is actually a hashmap of ending IDs, not whole endings --- src/main.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index cc01a35..98f4d28 100644 --- a/src/main.rs +++ b/src/main.rs @@ -86,12 +86,12 @@ struct Ending { #[derive(Debug, Eq, PartialEq)] struct Room { id: String, - palette: String, /// id + palette: String, // id name: Option, - tiles: Vec, /// tile ids - items: HashMap, /// item id + tiles: Vec, // tile ids + items: HashMap, // item id exits: HashMap, - endings: HashMap, + endings: HashMap, // ending id } #[derive(Debug, Eq, PartialEq)] @@ -711,7 +711,7 @@ fn room_from_string(string: String) -> Room { let mut palette = "0".to_string(); let mut items: HashMap = HashMap::new(); let mut exits: HashMap = HashMap::new(); - let endings: HashMap = HashMap::new(); + let mut endings: HashMap = HashMap::new(); loop { let last_line = lines.pop().unwrap();