Some panics to unreachable!, better error msging

This commit is contained in:
Llywelwyn 2023-09-23 00:12:05 +01:00
parent ae8f0d15a0
commit 23a42bab80
16 changed files with 19 additions and 19 deletions

View file

@ -20,7 +20,7 @@ impl RoomBasedStartingPosition {
let start_pos = rooms[0].center();
build_data.starting_position = Some(Position { x: start_pos.x, y: start_pos.y });
} else {
panic!("RoomBasedStartingPosition only works after rooms have been created");
unreachable!("RoomBasedStartingPosition tried to run without any rooms.");
}
}
}