Example #1
0
 public IList <Food> FoodNearMe(Fish fish)
 {
     return(new List <Food>(_fishes.AsParallel().OrderBy(x => x.DistanceToFoodSquared(fish)).Take(5)));
 }
Example #2
0
 private Latch ExistingLatch(Fish eater, Food target)
 {
     return(_latches.FirstOrDefault(x => x.Eater == eater && x.Target == target));
 }