diff options
| author | Freya Murphy <freya@freyacat.org> | 2025-10-07 11:42:05 -0400 |
|---|---|---|
| committer | Freya Murphy <freya@freyacat.org> | 2025-10-08 19:37:16 -0400 |
| commit | d16fe269aec12c88d22054d87cdef84e2b55b100 (patch) | |
| tree | b7ef2134245e63208671c2cac36e1d902401b19a /dungeon/src/lib.rs | |
| parent | initial baseline (diff) | |
| download | DungeonCrawl-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.rs | 9 |
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 } + } } |