I think that it's great that you are taking part in Battlecode at 13.
Here's an idea of what you might try:
Assumed: you have a RobotController rc. If you named yours something else, sub that in.
1) Keep a list of neutral trees that you might need chopped down with rc.senseNearbyTrees(rc.getType().sensorRadius, Team.NEUTRAL)
If there are a bunch of trees nearby, spawn yourself a lumberjack:
2) Pick a direction to start with... Direction.North is a good place to start.
3) If you imagine that the thing you are going to build is going to appear next to your gardener in that direction, you need to make sure that area is clear before you try to build. You can check it with RobotController.isCircleOccupied(MapLocation center, float radius).
You can figure out what "center" should be by taking the bot's location and adding the direction to it (use a radius of 1 for starters)
4) If it's clear, build yourself a lumberjack.
5) If not, loop around looking for a clear spot. You can do this by Direction.rotateLeftDegrees().
6) if you get all the way around, give up because there's no clear spot
Here's a code snippet:
` TreeInfo  nearbyNeutralTrees = rc.senseNearbyTrees(rc.GetType().sensorRadius, Team.NEUTRAL);
Direction spawnDirection = Direction.NORTH;
MapLocation here = rc.GetLocation();
int offsetDegrees = 0;
while (offsetDegrees < 360 && rc.isCircleOccupied(here.add(spawnDirection, 1), 1))
offsetDegrees += 5;
spawnDirection= - spawnDirection.turnLeftDegrees(5);
// you can spawn in this direction.
// you are totally blocked
Now, there are lots of better ways to do this, but this is just a simple check. Hopefully it helps.
Mark (A*ry Night)