summaryrefslogtreecommitdiff
path: root/dungeon/src/lib.rs
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-10-07 11:42:05 -0400
committerFreya Murphy <freya@freyacat.org>2025-10-08 19:37:16 -0400
commitd16fe269aec12c88d22054d87cdef84e2b55b100 (patch)
treeb7ef2134245e63208671c2cac36e1d902401b19a /dungeon/src/lib.rs
parentinitial baseline (diff)
downloadDungeonCrawl-d16fe269aec12c88d22054d87cdef84e2b55b100.tar.gz
DungeonCrawl-d16fe269aec12c88d22054d87cdef84e2b55b100.tar.bz2
DungeonCrawl-d16fe269aec12c88d22054d87cdef84e2b55b100.zip
impl default to dungeon and its types
Diffstat (limited to 'dungeon/src/lib.rs')
-rw-r--r--dungeon/src/lib.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/dungeon/src/lib.rs b/dungeon/src/lib.rs
index 66faec3..84fc339 100644
--- a/dungeon/src/lib.rs
+++ b/dungeon/src/lib.rs
@@ -52,7 +52,10 @@ impl Dungeon {
}
impl Default for Dungeon {
- fn default() -> Self {
- Self::new()
- }
+ fn default() -> Self {
+ let floor = Floor::default();
+ let player = Entity::player(floor.player_start());
+
+ Self { player, floor }
+ }
}