code: private boolean isClear(float x1, float y1, float x2, float y2, float step) {
  		float dx = (x2 - x1);
  		float dy = (y2 - y1);
  		float len = (float) Math.sqrt((dx*dx)+(dy*dy));
  		dx *= step;
  		dx /= len;
  		dy *= step;
  		dy /= len;
  		int steps = (int) (len / step);
  		
  		for (int i=0;i<steps;i++) {
  			float x = x1 + (dx*i);
  			float y = y1 + (dy*i);
  			
  			if (findSpace(x,y) == null) {
  				return false;
  			}
  		}
  		
  		return true;
  	}
docs: Check if a particular path is clear
  
  @param x1 The x coordinate of the starting point
  @param y1 The y coordinate of the starting point
  @param x2 The x coordinate of the ending point
  @param y2 The y coordinate of the ending point
  @param step The size of the step between points
  @return True if there are no blockages along the path