summaryrefslogtreecommitdiff
path: root/game/src/main.rs
diff options
context:
space:
mode:
authorYusuf Elsharawy <yusufse-2004@hotmail.com>2025-11-10 20:17:28 +0000
committerYusuf Elsharawy <yusufse-2004@hotmail.com>2025-11-10 20:17:28 +0000
commit9e9f1e6743dbc32f66b081077430035f4ba905ae (patch)
tree6c93bb63748a88f40606fb227f502f5ca0ef2116 /game/src/main.rs
parentRefactored some code, implemented player movement (diff)
downloadDungeonCrawl-9e9f1e6743dbc32f66b081077430035f4ba905ae.tar.gz
DungeonCrawl-9e9f1e6743dbc32f66b081077430035f4ba905ae.tar.bz2
DungeonCrawl-9e9f1e6743dbc32f66b081077430035f4ba905ae.zip
Fixed `Game` methods' returns
Diffstat (limited to '')
-rw-r--r--game/src/main.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/game/src/main.rs b/game/src/main.rs
index aabe38a..53d17b7 100644
--- a/game/src/main.rs
+++ b/game/src/main.rs
@@ -13,11 +13,11 @@ impl Game {
fn new(window: Window) -> Self {
// Initial game state
let dungeon = Dungeon::new();
- Ok(Self {
+ Self {
window,
dungeon,
current_dir: None,
- })
+ }
}
fn player_dir(&mut self) -> Option<Direction> {
@@ -73,11 +73,9 @@ impl Game {
// Draw a single frame
self.window.draw_frame(&self.dungeon);
}
- Ok(())
}
}
-
#[derive(Parser)]
struct Args {
/// Enable vsync