Skip to content
Snippets Groups Projects
Commit 326ac405 authored by Finn Bear's avatar Finn Bear
Browse files

More improvements to automata slide.

parent d8decbde
No related branches found
No related tags found
No related merge requests found
......@@ -160,15 +160,20 @@ impl Slide for Automata {
// Automatically begin expansion.
*expanding = true;
} else if *iterations == 20 {
// Draw a line to create a cool pattern.
// Draw a vertical line on the left to create a cool pattern.
for y in 4..self.life.size_cells - 4 {
self.life.set_fill(2, y, Color32::BLACK);
}
} else if *iterations == 30 {
// Draw another line to create a cool pattern.
// Draw another set of lines to create a cool pattern.
for x in 4..self.life.size_cells - 4 {
// Solid line at the bottom.
self.life
.set_fill(x, self.life.size_cells - 2, Color32::BLACK);
// Line with gaps at the top.
if x % 6 != 0 {
self.life.set_fill(x, 2, Color32::BLACK);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment