public function updateWithScores($scores)
    {
        // Update the winner player.
        if (isset($scores['winnerplayer'])) {
            $player = $this->getPlayer($scores['winnerplayer']);
            if ($player) {
                $this->playerQueryBuilder->save($player);
            }
        }

        // Update remaining players.
        foreach ($this->loggedInPlayers as $player) {
            $this->updatePlayer($player);
        }
        $this->playerQueryBuilder->saveAll($this->loggedInPlayers);
    }