Rename Controls component variable accessing engine
This commit is contained in:
parent
17697070ee
commit
72ce25a806
2 changed files with 8 additions and 8 deletions
|
|
@ -15,27 +15,27 @@ import 'package:rules_of_living/service/engine_service.dart';
|
|||
styleUrls: const ["controls_component.css"],
|
||||
)
|
||||
class ControlsComponent {
|
||||
final EngineService ctrl;
|
||||
final EngineService engine;
|
||||
|
||||
ControlsComponent(this.ctrl);
|
||||
ControlsComponent(this.engine);
|
||||
|
||||
void onStartClicked() {
|
||||
ctrl.toggleRunning();
|
||||
engine.toggleRunning();
|
||||
}
|
||||
|
||||
void onStepClicked() {
|
||||
ctrl.step();
|
||||
engine.step();
|
||||
}
|
||||
|
||||
void onResetClicked() {
|
||||
ctrl.reset();
|
||||
engine.reset();
|
||||
}
|
||||
|
||||
void onRandomClicked() {
|
||||
ctrl.addRandomPattern();
|
||||
engine.addRandomPattern();
|
||||
}
|
||||
|
||||
void onClearClicked() {
|
||||
ctrl.clear();
|
||||
engine.clear();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue