From 7ae61d8ca7eb2b6dd79c67e1fc08a021477d932e Mon Sep 17 00:00:00 2001 From: CrispyPin Date: Fri, 21 Jul 2023 16:39:03 +0200 Subject: [PATCH] clear screen before rendering --- src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 1d4e7b8..a75db9b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,9 +5,10 @@ use region::Region; fn main() { let mut region = Region::new(1, 1); region.randomise(); + print!("\x1B[2J"); // clear screen loop { - println!("####################"); + print!("\x1B[u"); // reset cursor region.print_all(true); region.step(); region.auto_grow();