-------------------------------- Source: Darren's Outpost - http://ahkuan.com from entry - http://ahkuan.com/weblog/archive/2006/09/01/cheng-xu-yuan-de-ai-qing.html this code fragment itself - http://ahkuan.com/weblog/144/code/1.html -------------------------------- --------------- code fragment begin --------------- using Life; using Life.Love; namespace love { /// ; /// love 的摘要说明。 /// ; public class love :Life.Love { void love(boy, girl) { if(boy.有房() && boy.有车()) { boy.Set(Nothing); return girl.嫁给(boy); } else if(girl.愿意等()) { next_year: for(day=1; day<=365; day++) { if(day == 情人节) { if(boy.GiveGirl(玫瑰)) girl.感情++; else girl.感情--; } if(day == girl.生日) { if( boy.GiveGirl(玫瑰) ) girl.感情++; else girl.感情--; } boy.拼命赚钱(); } 年龄++; girl.感情--; if(boy.有房() && boy.有车()) { boy.Set(Nothing); return girl.嫁给(boy); } else if(boy.赚钱 > 100,000 && girl.感情 > 8 ) goto next_year; else return girl.goto(another_boy); } return girl.goto(another_boy); } } }