public function testTrainByOffensiveTrainerWithSkill100() { $this->setUpPlayer(0, 0); $this->setUpTrainer(100, Trainer::PREFERRED_TRAINING_OFFENSIVE); $this->trainer->train($this->player); $this->assertEquals(25, $this->player->getTrainingValueDefense()); $this->assertEquals(75, $this->player->getTrainingValueOffense()); }
public function train() { if (!$this->hasTrainer()) { return; } foreach ($this->players as $player) { $this->trainer->train($player); } }