Files
Vari fa3d97354b More work on the Matchmaking logic
Now players get added to the queue and the controller tries to create matches when enough matching players are in the Queue.
2024-03-09 12:26:15 +01:00

28 lines
804 B
PHP

<?php
namespace App\Http\Responses\Api\Matchmaking;
use App\Models\Game\Matchmaking\MatchConfiguration;
class MatchProperties implements \JsonSerializable
{
public MatchConfiguration $matchConfiguration;
protected string $platform = 'Windows';
public function __construct(MatchConfiguration $matchConfiguration)
{
$this->matchConfiguration = $matchConfiguration;
}
public function jsonSerialize(): mixed
{
return [
'matchConfiguration' => $this->matchConfiguration->asset_path,
'countA' => $this->matchConfiguration->hunters,
'countB' => $this->matchConfiguration->runners,
'gameMode' => md5($this->matchConfiguration->asset_path) . '-Default',
'platform' => $this->platform,
];
}
}