diff options
-rw-r--r-- | src/input.rs | 7 | ||||
-rw-r--r-- | src/lib.rs | 4 | ||||
-rw-r--r-- | src/main.rs | 12 |
3 files changed, 13 insertions, 10 deletions
diff --git a/src/input.rs b/src/input.rs index d4a5ddd..23d0040 100644 --- a/src/input.rs +++ b/src/input.rs @@ -1 +1,6 @@ -pub struct Input {}
\ No newline at end of file +pub struct Input {} +impl Input { + pub fn new() -> Input { + Input{} + } +}
\ No newline at end of file @@ -1,7 +1,7 @@ +pub mod input; mod tetris; -mod input; -use input::Input; +use crate::input::Input; pub struct Game { tickrate: u8, // Between diff --git a/src/main.rs b/src/main.rs index 1abfbd9..aba1e8f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,10 +1,8 @@ -mod lib; -mod display; -mod input; +use tetris::Game; +use tetris::input::Input; fn main() { - println!("Hello World!"); - let tetris = lib::Tetris::new(); - - display::display(tetris.return_grid()); + let input = Input::new(); + let game = Game::new(); + game.game_loop(&input) }
\ No newline at end of file |