function top8Seeding() { $players = $this->standing->getEventStandings($this->name, 3); if (count($players) < 8) { $this->top4Seeding(); } else { $this->addPairing($players[0]->player, $players[7]->player, $this->current_round + 1, "P"); $this->addPairing($players[3]->player, $players[4]->player, $this->current_round + 1, "P"); $this->addPairing($players[1]->player, $players[6]->player, $this->current_round + 1, "P"); $this->addPairing($players[2]->player, $players[5]->player, $this->current_round + 1, "P"); Standings::writeSeed($this->name, $players[0]->player, 1); Standings::writeSeed($this->name, $players[7]->player, 2); Standings::writeSeed($this->name, $players[3]->player, 3); Standings::writeSeed($this->name, $players[4]->player, 4); Standings::writeSeed($this->name, $players[1]->player, 5); Standings::writeSeed($this->name, $players[6]->player, 6); Standings::writeSeed($this->name, $players[2]->player, 7); Standings::writeSeed($this->name, $players[5]->player, 8); } }