summaryrefslogtreecommitdiff
path: root/dungeon/src/lib.rs
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-11-11 20:46:17 -0500
committerFreya Murphy <freya@freyacat.org>2025-11-11 20:54:28 -0500
commit0bedd7991a7f2e3e35ae6b23d4f041c5a48454b9 (patch)
tree73175729fc202e0cda237871d88c3822c23bed8c /dungeon/src/lib.rs
parentdungeon: rewrite const_pos! (diff)
downloadDungeonCrawl-0bedd7991a7f2e3e35ae6b23d4f041c5a48454b9.tar.gz
DungeonCrawl-0bedd7991a7f2e3e35ae6b23d4f041c5a48454b9.tar.bz2
DungeonCrawl-0bedd7991a7f2e3e35ae6b23d4f041c5a48454b9.zip
dungeon: bsp generate should return a floor to use same single rng
- `Floor::new` is now `Floor::from_parts` and takes in and rng - updated bps tests to operate on a floor - removed pos < MAP_SIZE checks, since `Pos` gurentees this - bsp::generate now returns a floor
Diffstat (limited to 'dungeon/src/lib.rs')
-rw-r--r--dungeon/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/dungeon/src/lib.rs b/dungeon/src/lib.rs
index adc053e..4767942 100644
--- a/dungeon/src/lib.rs
+++ b/dungeon/src/lib.rs
@@ -121,7 +121,7 @@ impl From<Floor> for Dungeon {
// TODO: initalize rest of game state
// TODO: Randomize enemy positions/types
- let enemies = vec![Entity::zombie(floor.random_pos())];
+ let enemies = vec![Entity::zombie(floor.random_walkable_pos())];
Self {
floor,