implement error handling for avatar

This commit is contained in:
2020-04-18 17:42:32 +01:00
parent 8d93843b55
commit c47c4205aa
2 changed files with 6 additions and 11 deletions

View File

@@ -131,7 +131,7 @@ impl From<String> for Game {
} else if segment.starts_with("TIL") {
tiles.push(Tile::from(segment));
} else if segment.starts_with("SPR A") {
avatar = Some(Avatar::from(segment));
avatar = Some(Avatar::from(segment).unwrap());
} else if segment.starts_with("SPR") {
sprites.push(Sprite::from(segment));
} else if segment.starts_with("ITM") {