Skip to content

Commit

Permalink
Updated to PHP Chess 1.5.11
Browse files Browse the repository at this point in the history
  • Loading branch information
programarivm committed Jan 28, 2025
1 parent 6967047 commit c526e6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Command/Game/NonBlocking/AcceptPlayRequestCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function run(AbstractSocket $socket, array $argv, int $id)

if ($gameMode->getStatus() === PlayMode::STATUS_PENDING) {
$decoded = $gameMode->getJwtDecoded();
$color = (new Color())->opp($decoded->color);
$color = $decoded->color === Color::W ? Color::B : Color::W;
$decoded->username->{$color} = $params['username'] ?? self::ANONYMOUS_USER;
$decoded->elo->{$color} = $params['elo'];
$ids = [...$gameMode->getResourceIds(), $id];
Expand Down

0 comments on commit c526e6b

Please sign in to comment.