Example #1
0
 protected function setTournament($tournament)
 {
     $this->tournament = $tournament;
     foreach ($this->tournament->tournamentTeams()->getResults() as $team) {
         $team->team->homeMatchesAmount = 0;
         $team->team->wasPulledOut = false;
         $team->team->pulledOut = false;
         array_push($this->teams, ['id' => $team->id, 'name' => $team->team->name]);
     }
     shuffle($this->teams);
     $this->teamsCount = count($this->teams);
     $this->isOddTeamsCnt();
     $this->setPairCnt();
 }