Add getCell and setCell method to Simulation

This commit is contained in:
Unknown 2018-10-23 20:41:54 +02:00
parent 5116aff8a4
commit 52b440351d
2 changed files with 30 additions and 6 deletions

View file

@ -72,6 +72,10 @@ class Simulation {
return math.Point<int>(cx.toInt(), cy.toInt());
}
bool getCell(int x, int y) => map.get(x, y);
void setCell(int x, int y, bool value) => map.set(x, y, value);
void toggleCellState(int x, int y) {
map.set(x, y, !map.get(x, y));
}