infinite loop through generations

This commit is contained in:
Baipyrus 2024-05-07 13:31:19 +02:00
parent ae5a15a5e2
commit 7698919b6a

View File

@ -1,7 +1,7 @@
pub const BRIGHTNESS: &str = pub const BRIGHTNESS: &str =
"$@B%8&WM#*oahkbdpqwmZO0QLCJUYXzcvunxrjft/\\|()1{}[]?-_+~<>i!lI;:,\"^`'. "; "$@B%8&WM#*oahkbdpqwmZO0QLCJUYXzcvunxrjft/\\|()1{}[]?-_+~<>i!lI;:,\"^`'. ";
pub const HEIGHT: u32 = 10; pub const HEIGHT: u32 = 25; // Max: 35
pub const WIDTH: u32 = 10; pub const WIDTH: u32 = 25; // Max: 145
pub const K1: u32 = 2; pub const K1: u32 = 2;
pub const K2: u32 = 3; pub const K2: u32 = 3;
pub const G: u32 = 35; pub const G: u32 = 35;
@ -10,7 +10,15 @@ pub const Q: u32 = 100;
mod cell; mod cell;
use cell::*; use cell::*;
use std::{thread, time::Duration};
fn main() { fn main() {
println!("Hello, world!"); let mut grid = init_grid(None);
let 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));
}
} }