25 lines
571 B
Rust
25 lines
571 B
Rust
use anyhow::Result;
|
|
use std::fs::File;
|
|
use std::thread;
|
|
use crate::notes::Notes;
|
|
use crate::game_state::GameState;
|
|
use crate::notes_state::NotesState;
|
|
|
|
mod notes;
|
|
mod game_state;
|
|
mod notes_state;
|
|
mod util;
|
|
|
|
fn main() -> Result<()> {
|
|
let notes: Notes = serde_yaml::from_reader(File::open("notes.yaml")?)?;
|
|
let mut game_state = GameState::new()?;
|
|
let mut notes_state = NotesState::new(¬es, &mut game_state)?;
|
|
|
|
println!("Ready");
|
|
|
|
loop {
|
|
notes_state.tick(&mut game_state)?;
|
|
thread::sleep(std::time::Duration::from_millis(16));
|
|
}
|
|
}
|