mirror of
https://gitlab1.ptb.de/waltem01/Matrix
synced 2024-12-25 11:31:46 +00:00
implement FPS variable
This commit is contained in:
parent
7698919b6a
commit
95467cb94f
@ -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)));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user