Archived
1
0
Fork 0

app/Game/GameBoardState.php: Adding setAll()

This commit is contained in:
Henrik Hautakoski 2023-02-19 16:17:36 +01:00
parent 11eb3ccdd2
commit 5881efeb75

View file

@ -59,6 +59,14 @@ class GameBoardState
return $this;
}
public function setAll(): self
{
for ($i = 0; $i < $this->width * $this->height; $i++) {
$this->set($i, true);
}
return $this;
}
/**
* Toggle pressed state of a cell.
*/