swapped over to bracket-lib geometry's Rects, improved feature spawning

This commit is contained in:
Llywelwyn 2023-08-31 20:07:15 +01:00
parent 5a8114ec7e
commit fcb2bd2815
15 changed files with 217 additions and 107 deletions

View file

@ -17,8 +17,8 @@ impl RoomBasedStartingPosition {
fn build(&mut self, _rng: &mut RandomNumberGenerator, build_data: &mut BuilderMap) {
if let Some(rooms) = &build_data.rooms {
let start_pos = rooms[0].centre();
build_data.starting_position = Some(Position { x: start_pos.0, y: start_pos.1 });
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");
}