Archived
1
0
Fork 0
This repository has been archived on 2026-06-16. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
wow-raid-bingo/app/Game/GameSession.php
2021-11-04 12:14:52 +01:00

68 lines
1.1 KiB
PHP

<?php
namespace App\Game;
use Illuminate\Support\Collection;
class GameSession
{
/**
* The Game Board
*/
protected GameBoard $board;
/**
* Game settings for this session.
*/
protected GameSettings $settings;
/**
* Create a new GameSession
*/
public function __construct(GameBoard $board, GameSettings $settings)
{
$this->board = $board;
$this->settings = $settings;
}
/**
* Get the board
*/
public function getBoard() : GameBoard
{
return $this->board;
}
/**
* Get the board state
*/
public function getBoardState() : GameBoardState
{
return $this->getBoard()->getState();
}
/**
* Get Cards
*/
public function getCards() : Collection
{
return $this->getBoard()->getCards();
}
/**
* Get Settings
*/
public function getSettings() : GameSettings
{
return $this->settings;
}
/**
* Set new settings
*/
public function setSettings(GameSettings $settings) : self
{
$this->settings = $settings;
return $this;
}
}