Ejemplo n.º 1
0
 /**
  * @param int $teamIndex
  *
  * @return Trainer
  */
 protected function createEntity($teamIndex)
 {
     $trainer = new Trainer();
     $trainer->setPreferredTraining(rand(1, 3));
     $trainer->setSkill(max(1, min(100, round(rand(1, 100) / $teamIndex * 5))));
     return $trainer;
 }
Ejemplo n.º 2
0
 public function testGetTrainingFactorOffensiveByOffensiveTrainer()
 {
     $this->trainer->setPreferredTraining(Trainer::PREFERRED_TRAINING_OFFENSIVE);
     $this->assertEquals(0.75, $this->trainer->getTrainingFactorOffensive());
 }