mirror of
https://gitlab1.ptb.de/waltem01/Matrix
synced 2024-09-11 07:39:42 +00:00
infinite loop through generations
This commit is contained in:
parent
ae5a15a5e2
commit
7698919b6a
16
src/main.rs
16
src/main.rs
|
@ -1,7 +1,7 @@
|
|||
pub const BRIGHTNESS: &str =
|
||||
"$@B%8&WM#*oahkbdpqwmZO0QLCJUYXzcvunxrjft/\\|()1{}[]?-_+~<>i!lI;:,\"^`'. ";
|
||||
pub const HEIGHT: u32 = 10;
|
||||
pub const WIDTH: u32 = 10;
|
||||
pub const HEIGHT: u32 = 25; // Max: 35
|
||||
pub const WIDTH: u32 = 25; // Max: 145
|
||||
pub const K1: u32 = 2;
|
||||
pub const K2: u32 = 3;
|
||||
pub const G: u32 = 35;
|
||||
|
@ -10,7 +10,15 @@ pub const Q: u32 = 100;
|
|||
mod cell;
|
||||
use cell::*;
|
||||
|
||||
use std::{thread, time::Duration};
|
||||
|
||||
fn main() {
|
||||
println!("Hello, world!");
|
||||
let grid = init_grid(None);
|
||||
let mut grid = init_grid(None);
|
||||
|
||||
loop {
|
||||
print!("{esc}[2J{esc}[1;1H", esc = 27 as char);
|
||||
display_grid(&grid);
|
||||
update_grid(&mut grid);
|
||||
thread::sleep(Duration::from_millis(100));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user