clear screen before rendering
This commit is contained in:
parent
d22ed686e3
commit
7ae61d8ca7
1 changed files with 2 additions and 1 deletions
|
@ -5,9 +5,10 @@ use region::Region;
|
||||||
fn main() {
|
fn main() {
|
||||||
let mut region = Region::new(1, 1);
|
let mut region = Region::new(1, 1);
|
||||||
region.randomise();
|
region.randomise();
|
||||||
|
print!("\x1B[2J"); // clear screen
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
println!("####################");
|
print!("\x1B[u"); // reset cursor
|
||||||
region.print_all(true);
|
region.print_all(true);
|
||||||
region.step();
|
region.step();
|
||||||
region.auto_grow();
|
region.auto_grow();
|
||||||
|
|
Loading…
Reference in a new issue