Add getCell and setCell method to Simulation
This commit is contained in:
parent
5116aff8a4
commit
52b440351d
2 changed files with 30 additions and 6 deletions
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue