- commit
- c9ffdd7054fbbddaefc59d874e71ebb9aaaf56ee
- parent
- 6639f5a5c6a4e4e67590a13bab31beed632c0b03
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2022-02-24 06:00
do not flood scrollback buffer
Diffstat
| M | flood.rs | 5 | +++-- |
1 files changed, 3 insertions, 2 deletions
diff --git a/flood.rs b/flood.rs
@@ -123,9 +123,10 @@ fn play(seed: u64) -> bool {
123 123 map[i] = rng.gen_range(0, 6);
124 124 }
125 125
-1 126 println!("\x1b[2J");
126 127 for step in 0..=STEPS {
127 -1 // clear screen and move cursor to top left
128 -1 print!("\x1b[2J\x1b[H");
-1 128 // move cursor to top left and clear screen
-1 129 print!("\x1b[H\x1b[J");
129 130 render_status(step);
130 131 render(&map);
131 132 println!("");