aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
blob: ce1d7ad07c1af49e01b28a0e74d7f9bc933d7b58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
pub mod input;
mod tetris;

use crate::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);
    }
}