/** * Setts an ordinary card with random values **/ public function setCard() { $cardAvailableConfigs = GlobalProp::getConfig(); foreach ($this->_prop as $value) { $randomKey = array_rand($cardAvailableConfigs[$value]); $this->{$value} = $cardAvailableConfigs[$value][$randomKey]; } return $this; }
/** *Including the Files when Game is instanced 4 now */ function __construct() { include "GlobalProp.php"; $this->init(GlobalProp::getConfigPath()); }