Add Random Button Functionality

Adds random pattern toward the center of the canvas. Does not delete anything.
This commit is contained in:
Marty Oehme 2018-07-07 22:02:04 +02:00
parent c5b62e6c9f
commit c5ed18f0ad
2 changed files with 5 additions and 1 deletions

View file

@ -48,5 +48,8 @@ class AppComponent implements OnInit {
engine.reset();
}
void onRandomClicked() {}
void onRandomClicked() {
engine.running = false;
engine.grid.addPattern();
}
}

View file

@ -83,6 +83,7 @@ class Grid {
}
break;
}
_dirty = true;
}
void setCellState(int x, int y, bool state) {