From 1d1ca2fdae780efdb9d27394f5d3720fe9282c91 Mon Sep 17 00:00:00 2001 From: curly Date: Sat, 13 Aug 2022 17:21:42 -0600 Subject: define everthing I can think of --- src/lib.rs | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/lib.rs (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..7cbe359 --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,29 @@ +mod tetris; +mod input; + +use input::Input; + +pub struct Game { + tickrate: u8, // Between + maxfps: u8, // Between 1 and 240 +} +impl Game { + pub fn new() -> Game { + Game{ + tickrate: 20, + maxfps: 30, + } + } + + // The actual game loop + pub fn game_loop(&self, input: &Input) {} +} + +#[cfg(test)] +mod tests { + #[test] + fn it_works() { + let result = 2 + 2; + assert_eq!(result, 4); + } +} -- cgit v1.2.3