return $hasRequired;
}
+ /**
+ * Determines if the goverment can still pay a "virtual training course" in general
+ *
+ * @return $ifGovHelps Wether if the goverment helps the user with a virtual training course
+ */
+ public function ifGovermentPaysTraining () {
+ // By default they want to help.
+ $ifGovHelps = true;
+
+ // First get a goverment instance from registry
+ $govermentInstance = Registry::getRegistry()->getInstance('goverment');
+
+ // Is it there?
+ if (is_null($govermentInstance)) {
+ // Then create a new one
+ $govermentInstance = ObjectFactory::createObjectByConfiguredName('goverment_class', array($this));
+
+ // Store it in registry
+ Registry::getRegistry()->addInstance('goverment', $govermentInstance);
+ } // END - if
+
+ // Then ask the goverment if they want to pay a "startup help" to the user
+ if ($govermentInstance->ifGovermentAlreadyPayedTraining()) {
+ // Training already given!
+ $ifGovHelps = false;
+ } // END - if
+
+ // Return result here
+ return $ifGovHelps;
+ }
+
/**
* Determines if the goverment can still pay a "startup help" to the user
*
- * @return $ifGovHelped Wether if the goverment has helped the user with startup
+ * @return $ifGovHelps Wether if the goverment helps the user with some startup money
*/
public function ifGovermentPaysStartupHelp () {
- // By default they have not payed, which is indeed good. ;-)
- $ifGovHelped = false;
+ // By default they want to help.
+ $ifGovHelps = true;
// First get a goverment instance from registry
$govermentInstance = Registry::getRegistry()->getInstance('goverment');
} // END - if
// Then ask the goverment if they want to pay a "startup help" to the user
- if ($govermentInstance->ifGovermentAlreadyPayedStartupHelp()) {
+ if ($govermentInstance->ifGovermentPayedMaxmimumStartupHelp()) {
// They can't pay anymore to the user (excited amount)
- $ifGovHelped = true;
+ $ifGovHelps = false;
} // END - if
// Return result here
- return $ifGovHelped;
+ return $ifGovHelps;
}
/**
* Checks wether the user can take points from the money bank
*
* @return $bankLends Wether the money bank is able to lend money
- * @todo Need to check the bank if they can generally lend money to the user
+ * @todo Need to implement MoneyBank::ifBankLendsMoreMoney()
*/
public function ifUserAllowedTakeCreditsFromMoneyBank () {
// Per default the money bank cannot pay
} // END - if
// Does the money bank lend more money?
- /** UNFINISHED PART!
+ /* UNFINISED:
if ($bankInstance->ifBankLendsMoreMoney()) {
// Okay, that they will do
$bankLends = true;