diff options
Diffstat (limited to 'dungeon/src/lib.rs')
| -rw-r--r-- | dungeon/src/lib.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/dungeon/src/lib.rs b/dungeon/src/lib.rs index cb57bf0..e85b718 100644 --- a/dungeon/src/lib.rs +++ b/dungeon/src/lib.rs @@ -65,17 +65,13 @@ impl Default for Dungeon { } } impl From<Floor> for Dungeon { - fn from(floor: Floor) -> Self { + fn from(mut floor: Floor) -> Self { let player = Player::new(floor.player_start()); // TODO: initalize rest of game state // TODO: Randomize enemy positions/types - let enemies = vec![Enemy::new( - EnemyType::Zombie, - Pos::new(player.entity.pos.x() + 4, player.entity.pos.y()) - .unwrap_or(const_pos!(1, 1)), - )]; + let enemies = vec![Enemy::new(EnemyType::Zombie, floor.random_pos())]; Self { floor, |