diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index e7a11a9..95b6ea3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,23 @@ +use std::io::{stdin, stdout}; + +use rustic_adventure::{structure::Building, Game, Position}; + fn main() { - println!("Hello, world!"); + let stdin = stdin(); + let stdout = stdout(); + + let mut game = Game::default(); + + let building = Building::builder() + .width(50) + .height(50) + .position((10, 10)) + .build(); + + game.structures.push(building); + game.player.set_position((5, 5)).unwrap(); + + if let Err(err) = game.run_loop(stdin, stdout) { + eprintln!("{}", err) + } } |