handle old room format

This commit is contained in:
Max Bradbury 2020-04-18 15:28:51 +01:00
parent 7c76a9d3d2
commit fe3fac5e2b
1 changed files with 5 additions and 1 deletions

View File

@ -84,7 +84,11 @@ impl From<String> for Room {
let mut tiles: Vec<String> = Vec::new();
for line in lines.into_iter() {
let line: Vec<&str> = line.split(",").collect();
let line: Vec<&str> = if line.contains(",") {
line.split(",").collect()
} else { // old room format
line.split("").collect()
};
for tile_id in line {
tiles.push(tile_id.to_string());