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);
    }
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);
    }
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 ) ; }
Update when scores is available.

@param $scores
Update when scores is available .