function apocalpse() {
foreach($earth->population as $personIndex => $person) {
if($person->gotLuck == true) {
$ark[] = $person;
}
elseif($person->gotRidiculousLuck == true) {
$earth->countries("China")->moveUnder($person);
$ark[] = $person;
}
else {
unset($earth->population[$personIndex]);
}
}
}
foreach($earth->population as $personIndex => $person) {
if($person->gotLuck == true) {
$ark[] = $person;
}
elseif($person->gotRidiculousLuck == true) {
$earth->countries("China")->moveUnder($person);
$ark[] = $person;
}
else {
unset($earth->population[$personIndex]);
}
}
}
}
Pingback: fun: Movies as code – Moishe Beshkin