app/Game/GameBoardState.php: Adding setAll()
This commit is contained in:
parent
11eb3ccdd2
commit
5881efeb75
1 changed files with 8 additions and 0 deletions
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
|||
Reference in a new issue