Let's just say we want to sense all trees in a given radius. Here's the code to do this:
TreeInfo friendly_trees_near_center =rc.senseNearbyTrees(center,radius, RobotPlayer.FRIEND);
TreeInfo neutral_trees_near_center =rc.senseNearbyTrees(center,radius,RobotPlayer.NEUTRAL);
TreeInfo enemy_trees_near_center = rc.senseNearbyTrees(center,radius, RobotPlayer.ENEMY);
This code may be safe from bugs and easy to understand, but this is certainly not ready for change, and absolutely is not DRY. Could we overload senseNearby*****() to have the option to sense every object of that type within the defined circle?