Add Random Button Functionality
Adds random pattern toward the center of the canvas. Does not delete anything.
This commit is contained in:
parent
c5b62e6c9f
commit
c5ed18f0ad
2 changed files with 5 additions and 1 deletions
|
@ -48,5 +48,8 @@ class AppComponent implements OnInit {
|
||||||
engine.reset();
|
engine.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void onRandomClicked() {}
|
void onRandomClicked() {
|
||||||
|
engine.running = false;
|
||||||
|
engine.grid.addPattern();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,6 +83,7 @@ class Grid {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
_dirty = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setCellState(int x, int y, bool state) {
|
void setCellState(int x, int y, bool state) {
|
||||||
|
|
Loading…
Reference in a new issue