|
发表于 2004-3-6 20:34:22
|
显示全部楼层
这个女孩子也太那个了吧,嫁给那个男孩以后,就"年龄++; girl.感情--; "!!!
在此我也写一段程序:
boyAndgirlMarried=False;
RESULT love (boy,girl)
{
if (girl.性格活泼() AND girl.心地善良() AND gril.长得不丑() AND girl.weight<=120 )
{
boy.喜欢=3;
boy.送花();
if(boy.聪明() AND boy.有点笨() AND boy.height>gilr.height AND boy.长得可以() AND boy.有所成就())
{
girl.喜欢=4;
}
if(boy.喜欢+girl.喜欢>=7)
{
boy.恋爱();
girl.恋爱();
boyandgirl.感情=1;
}
while(boy.恋爱() AND girl.恋爱())
for( day=1; day <=365; day++)
{
if( day.sign == "情人节" )
{
if( boy.GiveGirl(玫瑰) )
{
girl.喜欢++;
}
else
{
girl.喜欢--;
}
if(boy.kiss())girl.喜欢+=2
}
if( day.sign == girl.生日)
if( boy.GiveGirl(玫瑰) )
{
girl.喜欢++;
}
else
{
girl.喜欢--;
}
boyandgirl.感情=1+(girl.喜欢+ boy.喜欢)\ 10;
if (boyandgirl.感情>=30)
return boyAndgirlMarried=True;
}
}
else
reture boyAndgirlMarried=false;
} |
|