/** * Renvoie la quantité de nourriture disponible sur la case * @param Hexa $hexa * @return int */ public static function getNourriture(Hexa $hexa) { if (isset(self::$nourriture[$hexa->getTemperature() . '_' . $hexa->getAltitude() . '_' . $hexa->getVegetation()])) { return self::$nourriture[$hexa->getTemperature() . '_' . $hexa->getAltitude() . '_' . $hexa->getVegetation()]; } else { return null; } }
/** * * Renvoie le type de terrain de l'hexa fourni * @param Hexa $hexa * @return int */ public static function getType(Hexa $hexa) { return self::$correspondances[$hexa->getTemperature() . '_' . $hexa->getAltitude() . '_' . $hexa->getVegetation()]; }