private int getNumberOfFarmsNearestTo(Tile location,
Collection<City> cities, Collection<Farm> farms) {
int food = 0;
for (Farm farm : farms) {
Tile farmLocation = farmService.getLocation(farm);
double shortestDistance = Double.MAX_VALUE;
Tile nearestLocation = new Tile(Integer.MAX_VALUE,
Integer.MAX_VALUE);
for (City city : cities) {
Tile cityLocation = cityService.getLocation(city);
if (farmLocation.absoluteDistanceTo(cityLocation) <= shortestDistance) {
nearestLocation = cityLocation;
shortestDistance = farmLocation
.absoluteDistanceTo(cityLocation);
}