private static bool SatisfyBySecondAlgorithm(UserExtended user) { if (user.IsFriend.HasValue && user.IsFriend.Value) { return(false); } //if (user.Sex == Sex.Female && user.AgeVisible() && user.IsAgeBetween(MinAge, MaxAge)) //{ // return true; //} var ageBetween = user.AgeVisible() && user.IsAgeBetween(37, 90); return(user.Sex == Sex.Male || ageBetween); }
private static bool ShouldLike(UserExtended user, AgeRange ageRange, List <CityExtended> cities) { if (!user.IsAgeBetween(ageRange.Min, ageRange.Max)) { return(false); } if (user.HasBeenOfflineMoreThanDays(2)) { return(false); } // var cityIds = cities.Select(x => x.Id.Value).Distinct().ToArray(); if (!user.FromCity(cities)) { return(false); } if (user.Sex != Sex.Female) { return(false); } if (user.BlackListed()) { return(false); } if (user.IsFriend.HasValue && user.IsFriend == true) { return(false); } if (!user.IsSingle()) { return(false); } if (string.IsNullOrWhiteSpace(user.PhotoId)) { return(false); } return(user.CommonCount == 0 || !user.CommonCount.HasValue); }