Пример #1
0
 public function postTeamFormation(Request $request)
 {
     $formationStructure = FormationFactory::getFormationStructure($request->get("formation"));
     $this->team->setFormation($formationStructure);
     $formation = new Formation($formationStructure, $this->team);
     $formation->spreadPlayersOnPositions();
     return ['active' => $this->team->getActivePlayers(), 'passive' => $this->team->getPasivePlayers()];
 }
Пример #2
0
 public function getFormation()
 {
     return FormationFactory::getFormationStructure($this->team->formation);
 }