コード例 #1
0
 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());
 }
コード例 #2
0
ファイル: Team.php プロジェクト: kosak83/OpenSoccerStar
 public function train()
 {
     if (!$this->hasTrainer()) {
         return;
     }
     foreach ($this->players as $player) {
         $this->trainer->train($player);
     }
 }