Пример #1
0
 protected static function childIQ($gender, $father, $mother)
 {
     // // Son's IQ depends on mother's IQ
     // if ($gender == Human::MALE) {
     //     $iQ = Random::iQ($mother->getIQ(), self::IQ_INHER_VAR, self::IQ_INHER_SD);
     // // Daughter's IQ depends on father's and mother's IQ
     // } else {
     //     $averageIQ = ($father->getIQ() + $mother->getIQ()) / 2;
     //     $iQ = Random::iQ($averageIQ, self::IQ_INHER_VAR, self::IQ_INHER_SD);
     // }
     $iQ = Random::iQ($mother->getIQ(), self::IQ_INHER_VAR, self::IQ_INHER_SD);
     return $iQ;
 }