diff options
Diffstat (limited to 'game/src/lib.rs')
| -rw-r--r-- | game/src/lib.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/game/src/lib.rs b/game/src/lib.rs index 23cdcfa..3d9c8a7 100644 --- a/game/src/lib.rs +++ b/game/src/lib.rs @@ -1,6 +1,6 @@ use dungeon::{ - Dungeon, UpdateResult, player::PLAYER_INVENTORY_SIZE_USIZE, player_input::PlayerInput, - pos::Direction, + Dungeon, UpdateResult, entity::Item, map::Tile, player::PLAYER_INVENTORY_SIZE_USIZE, + player_input::PlayerInput, pos::Direction, }; use graphics::{Key, Window}; @@ -86,7 +86,8 @@ impl Game { self.window.toggle_debug(); } if self.window.is_key_pressed(Key::F4) { - self.dungeon.player.entity.health = 0; + *self.dungeon.floor.get_mut(self.dungeon.player.entity.pos) = + Tile::Chest(Some(Item::Bomb)); } // Update game state |