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