Remove clear function: Code Duplication
This commit is contained in:
parent
0da2d08b74
commit
37bff59f83
2 changed files with 1 additions and 5 deletions
|
@ -39,6 +39,6 @@ class ControlsComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
void onClearClicked() {
|
void onClearClicked() {
|
||||||
sim.clear();
|
sim.reset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,10 +24,6 @@ class SimulationService {
|
||||||
_sim.addRandomPattern();
|
_sim.addRandomPattern();
|
||||||
}
|
}
|
||||||
|
|
||||||
void clear() {
|
|
||||||
_sim.reset();
|
|
||||||
}
|
|
||||||
|
|
||||||
Point<int> get gridSize => _sim.gridSize;
|
Point<int> get gridSize => _sim.gridSize;
|
||||||
void set gridSize(Point<int> size) {
|
void set gridSize(Point<int> size) {
|
||||||
_sim.gridSize = size;
|
_sim.gridSize = size;
|
||||||
|
|
Loading…
Reference in a new issue