Make clear map function name more concise

Renam resetting the grid to clearMap.
This commit is contained in:
Unknown 2018-10-21 14:00:01 +02:00
parent 66c273c783
commit e115ed2f48
3 changed files with 10 additions and 10 deletions

View file

@ -18,7 +18,7 @@ class SimulationService {
}
void reset() {
_sim.reset();
_sim.clearMap();
}
void addRandomPattern() {

View file

@ -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));