private static boolean checkTile(Level level, int x, int y) {

		// get the tile at the location
		Tile t = level.getTile(x >> 3, y >> 3);

		// trees can't grow on solids or water
		if (t instanceof BasicSolidTile || t instanceof AnimatedTile) {
			return false;
		}

		// don't place a tree in a building
		for (Entity e : level.getEntities()) {
			if (e instanceof SolidEntity) {
				if (e.getBounds().intersects(new Rectangle(x, y, HORIZONTAL_SPACING, treeHeight))) {
					return false;
				}
			}
		}

		return true;
	}