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

Comments.

parent d553505d
No related branches found
No related tags found
No related merge requests found
......@@ -47,25 +47,6 @@ impl Default for Automata {
// Unique identifier for the grid.
life.name = "life";
// Fill grid with random cells.
/*
for y in 0..life.size_cells {
for x in 0..life.size_cells {
if rand::thread_rng().gen_bool(0.5) {
life.set_fill(x, y, Color32::BLACK);
}
}
}
*/
// This would replace the grid with a single oscillator.
/*
life.clear_fill();
life.set_fill(5, 5, Color32::BLACK);
life.set_fill(6, 5, Color32::BLACK);
life.set_fill(7, 5, Color32::BLACK);
*/
Self {
life,
state: AutomataState::default(),
......@@ -85,6 +66,8 @@ impl Slide for Automata {
rules: None,
};
// Seeded such that we get the same pattern every time, which is important since
// we draw arrows to preset coordinates.
let mut rng = ChaCha8Rng::seed_from_u64(123456789876543216);
// Randomize grid.
......
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