diff --git a/lib/app_component.dart b/lib/app_component.dart index 9f97ef0..7c3d314 100644 --- a/lib/app_component.dart +++ b/lib/app_component.dart @@ -39,8 +39,7 @@ class AppComponent implements OnInit { } void onStepClicked() { - engine.running = false; - engine.update(); + engine.step(); } void onResetClicked() { diff --git a/lib/src/Engine.dart b/lib/src/Engine.dart index cc59f96..a737758 100644 --- a/lib/src/Engine.dart +++ b/lib/src/Engine.dart @@ -60,6 +60,10 @@ class Engine { void update() { // print("updating"); if(!grid.update()) running = false; + + void step() { + running = false; + _grid.update(); } void render([num interp]) {