Archived
1
0
Fork 0

Formatting fixes and cleanup.

This commit is contained in:
Henrik Hautakoski 2023-01-31 07:34:02 +01:00
parent a1e14a3e60
commit 51fb71e469
41 changed files with 394 additions and 392 deletions

View file

@ -39,7 +39,7 @@ class GameBoard
/**
* Return the state
*/
public function getState() : GameBoardState
public function getState(): GameBoardState
{
return $this->state;
}
@ -47,7 +47,7 @@ class GameBoard
/**
* Get the size of the board.
*/
public function getSize() : int
public function getSize(): int
{
return $this->state->getSize();
}
@ -55,7 +55,7 @@ class GameBoard
/**
* Clear the game board.
*/
public function clear() : void
public function clear(): void
{
$this->state->clear();
}
@ -64,7 +64,7 @@ class GameBoard
* Check if the board is in an ended state.
* E.g: all cards is in a winning state.
*/
public function hasGameEnded() : bool
public function hasGameEnded(): bool
{
return $this->state->isFull(GameBoardState::STATE_WIN);
}
@ -74,7 +74,7 @@ class GameBoard
*
* @throw NotEnoughCardsException
*/
public function regenerate(GameSettings $settings) : self
public function regenerate(GameSettings $settings): self
{
$num_cards = $this->getSize();
$cards = Card::getBySettings($settings, $num_cards);