1
0
Fork 0
wow-raid-bingo/app/Game/GameSession.php

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;
}
}