Spatial ecology: Its effects on the choice of friends and enemies