Slow down chars mode.

This commit is contained in:
Juergen Stuber 2018-12-31 20:34:58 +01:00
parent 360bc5f392
commit 75ca3a28e5

View File

@ -62,6 +62,7 @@ fn main() -> std::io::Result<()> {
.take(y_size) .take(y_size)
.collect::<Vec<_>>(); .collect::<Vec<_>>();
loop { loop {
if rng.gen::<f64>() < 0.01 {
let x = rng.gen_range(0, x_size / 8); let x = rng.gen_range(0, x_size / 8);
let y = rng.gen_range(0, y_size / 8); let y = rng.gen_range(0, y_size / 8);
let color = pick_color(c0, c1, &mut rng); let color = pick_color(c0, c1, &mut rng);
@ -78,6 +79,7 @@ fn main() -> std::io::Result<()> {
}; };
} }
} }
}
let mut buf = Vec::with_capacity(x_size * y_size * 3); let mut buf = Vec::with_capacity(x_size * y_size * 3);
send(&mut buf, &frame)?; send(&mut buf, &frame)?;