mirror of
https://github.com/Deathgarden-Rebirth/Deathgarden_Rebirth-Rewrite.git
synced 2026-09-09 11:45:18 -05:00
Now players get added to the queue and the controller tries to create matches when enough matching players are in the Queue.
28 lines
804 B
PHP
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,
|
|
];
|
|
}
|
|
} |