implement FPS variable

This commit is contained in:
Baipyrus 2024-05-07 13:32:43 +02:00
parent 7698919b6a
commit 95467cb94f

View File

@ -2,6 +2,7 @@ pub const BRIGHTNESS: &str =
"$@B%8&WM#*oahkbdpqwmZO0QLCJUYXzcvunxrjft/\\|()1{}[]?-_+~<>i!lI;:,\"^`'. ";
pub const HEIGHT: u32 = 25; // Max: 35
pub const WIDTH: u32 = 25; // Max: 145
pub const FPS: u32 = 10;
pub const K1: u32 = 2;
pub const K2: u32 = 3;
pub const G: u32 = 35;
@ -19,6 +20,6 @@ fn main() {
print!("{esc}[2J{esc}[1;1H", esc = 27 as char);
display_grid(&grid);
update_grid(&mut grid);
thread::sleep(Duration::from_millis(100));
thread::sleep(Duration::from_millis(1000 / (FPS as u64)));
}
}