Implement Engine Step Method

This commit is contained in:
Marty Oehme 2018-07-09 17:27:56 +02:00
parent 9030d31e97
commit ac9a7c7591
2 changed files with 5 additions and 2 deletions

View file

@ -39,8 +39,7 @@ class AppComponent implements OnInit {
} }
void onStepClicked() { void onStepClicked() {
engine.running = false; engine.step();
engine.update();
} }
void onResetClicked() { void onResetClicked() {

View file

@ -60,6 +60,10 @@ class Engine {
void update() { void update() {
// print("updating"); // print("updating");
if(!grid.update()) running = false; if(!grid.update()) running = false;
void step() {
running = false;
_grid.update();
} }
void render([num interp]) { void render([num interp]) {