Make clear map function name more concise
Renam resetting the grid to clearMap.
This commit is contained in:
parent
66c273c783
commit
e115ed2f48
3 changed files with 10 additions and 10 deletions
|
|
@ -18,7 +18,7 @@ class SimulationService {
|
|||
}
|
||||
|
||||
void reset() {
|
||||
_sim.reset();
|
||||
_sim.clearMap();
|
||||
}
|
||||
|
||||
void addRandomPattern() {
|
||||
|
|
|
|||
|
|
@ -30,12 +30,12 @@ class Simulation {
|
|||
}
|
||||
|
||||
Simulation(int w, int h) : this.map = new Grid(w, h) {
|
||||
this.map = reset();
|
||||
this.map = clearMap();
|
||||
}
|
||||
|
||||
Simulation.fromGrid(Grid<bool> map) : this.map = map;
|
||||
|
||||
Grid<bool> reset([Grid<bool> map]) {
|
||||
Grid<bool> clearMap(Grid<bool> map) {
|
||||
map ??= this.map;
|
||||
// dirty = true;
|
||||
// map.setAll(0, List.filled(map.length, false));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue