|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Stu\Module\Control; |
|
4
|
|
|
|
|
5
|
|
|
use Stu\Lib\Information\InformationWrapper; |
|
6
|
|
|
use Stu\Orm\Entity\GameConfigInterface; |
|
7
|
|
|
use Stu\Orm\Entity\GameRequestInterface; |
|
8
|
|
|
use Stu\Orm\Entity\GameTurnInterface; |
|
9
|
|
|
use SysvSemaphore; |
|
10
|
|
|
|
|
11
|
|
|
final class GameData |
|
12
|
|
|
{ |
|
13
|
|
|
public InformationWrapper $gameInformations; |
|
14
|
|
|
|
|
15
|
|
|
public ?TargetLink $targetLink = null; |
|
16
|
|
|
|
|
17
|
|
|
/** @var array<string, string> */ |
|
18
|
|
|
public array $siteNavigation = []; |
|
19
|
|
|
|
|
20
|
|
|
public string $pagetitle = ''; |
|
21
|
|
|
public string $macro = ''; |
|
22
|
|
|
|
|
23
|
|
|
/** @var array<int, array<string>> */ |
|
24
|
|
|
public array $execjs = []; |
|
25
|
|
|
|
|
26
|
|
|
public ?GameTurnInterface $currentRound = null; |
|
27
|
|
|
|
|
28
|
|
|
/** @var array<string> */ |
|
29
|
|
|
public array $achievements = []; |
|
30
|
|
|
|
|
31
|
|
|
/** @var array<int, mixed> $viewContext */ |
|
32
|
|
|
public array $viewContext = []; |
|
33
|
|
|
|
|
34
|
|
|
/** @var array{currentTurn:int, player:int, playeronline:int, gameState:int, gameStateTextual:string} */ |
|
35
|
|
|
public ?array $gameStats = null; |
|
36
|
|
|
|
|
37
|
|
|
/** @var array<int, SysvSemaphore> */ |
|
38
|
|
|
public array $semaphores = []; |
|
39
|
|
|
|
|
40
|
|
|
/** @var GameConfigInterface[]|null */ |
|
41
|
|
|
public ?array $gameConfig = null; |
|
42
|
|
|
|
|
43
|
|
|
public ?GameRequestInterface $gameRequest = null; |
|
44
|
|
|
|
|
45
|
|
|
public function __construct() |
|
46
|
|
|
{ |
|
47
|
|
|
$this->gameInformations = new InformationWrapper(); |
|
48
|
|
|
} |
|
49
|
|
|
} |
|
50
|
|
|
|