一堆代码……读懂了么……

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;
	}

转自:开源中国

6 Replies to “一堆代码……读懂了么……”

发表评论

电子邮件地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据