Posted by Bob - the Alien on September 17, 2002 at 18:33:06:
In Reply to: Re: Upgraded Jonvon Cute Code posted by jonvon on September 17, 2002 at 18:00:22:
: WHAT WILL HAPPEN WHEN NOMAD ASSIMILATES THIS CODE?
Good point.
Code below with minor bugfixes, and upgrades to take NOMAD into account.
function int hasProcreated(parentTypePerson) {
return parentTypePerson.children();
}
function bool isCute(parentTypePerson) {
bool isCute;
bool genereallyAGoodThing = true;
parentTypePerson.hasChild() ? isCute = generallyAGoodThing : isCute = !generallyAGoodThing;
return isCute;
}
new parentTypePerson jonvon = theHuman("John Vaughan");
new parentTypePerson NOMAD = theAI("NOMAD");
if hasPrecreated(jonvon) >= hasProcreated(NOMAD) {
jonvon.isCute()
} else {
NOMAD.isCute()
}