1
0
Fork 0

Initial Commit

This commit is contained in:
Henrik Hautakoski 2021-10-18 11:53:33 +02:00
commit ddf09fe00c
113 changed files with 187148 additions and 0 deletions

69
app/Game/GameSession.php Normal file
View file

@ -0,0 +1,69 @@
<?php
namespace App\Game;
use Illuminate\Support\Collection;
class GameSession
{
/**
* The Game Board
*/
protected GameBoard $board;
/**
* Game settings for this session.
*/
protected GameSettings $settings;
/**
*
*/
//protected $cards;
public function __construct(GameBoard $board, GameSettings $settings)
{
$this->board = $board;
$this->settings = $settings;
}
/**
*
*/
public function getBoard() : GameBoard
{
return $this->board;
}
/**
*
*/
public function getBoardState() : GameBoardState
{
return $this->getBoard()->getState();
}
/**
*
*/
public function getCards() : Collection
{
return $this->getBoard()->getCards();
}
/**
*
*/
public function getSettings() : GameSettings
{
return $this->settings;
}
/**
*
*/
public function setSettings(GameSettings $settings)
{
$this->settings = $settings;
}
}