代码人生
private Man contact(Woman woman) {
Man man = new Man();
int perfect = 0;
if (!woman.sincerity || woman.smoking || woman.nightclub)
return null;
perfect = 70;
perfect += woman.cooking ? 5 : -2;
perfect += (woman.height > 158 && woman.height < 172) ? 5 : -5;
perfect += (woman.age > 19 && woman.age < 22) ? 5 : -10;
if (perfect < 60) {
//这才是重口味。。。
return contact(man);
}
man.perfect = perfect;
man.age = 21;
man.height = 174;
man.sincerity = true;
man.smoking = true;
man.cooking = true;
man.nightclub = false;
return man;
}