diff options
Diffstat (limited to 'dungeon/src/lib.rs')
| -rw-r--r-- | dungeon/src/lib.rs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/dungeon/src/lib.rs b/dungeon/src/lib.rs index 8119119..ee61632 100644 --- a/dungeon/src/lib.rs +++ b/dungeon/src/lib.rs @@ -1,11 +1,11 @@ //! The `dungon` crate contains the core functionality for //! interacting with a `Dungeon` and its components. -mod bsp; -mod enemy; -mod entity; -mod map; -mod pos; +pub mod bsp; +pub mod enemy; +pub mod entity; +pub mod map; +pub mod pos; pub use bsp::*; pub use entity::*; @@ -70,9 +70,11 @@ impl From<Floor> for Dungeon { // TODO: initalize rest of game state // TODO: How will we randomize enemy type/number per floor? + // For now, just create one enemy a few tiles to the right of the player let enemies = vec![Enemy::new( EnemyType::Zombie, - Pos::new(player.entity.pos.x() + 4, player.entity.pos.y()).unwrap(), + Pos::new(player.entity.pos.x() + 4, player.entity.pos.y()) + .unwrap_or(const_pos!(1, 1)), )]; Self { |