/**
  * Checks if square is void, out of map, out of tower range
  *
  * @param loc
  * @return
  */
 public boolean locationValid(MapLocation loc) {
   return !(rc.senseTerrainTile(loc) == TerrainTile.VOID
       || loc.x > xmax
       || loc.y > ymax
       || loc.x < 0
       || loc.y < 0
       || loc.distanceSquaredTo(tLoc) > attackRadius);
 }
  public SunrayHerder(Controller c, MapLocation pLoc) {
    this.c = c;
    this.rc = c.rc;
    this.pLoc = pLoc;
    center = pLoc;
    tLoc = rc.getLocation();
    attackRadius = c.attackRadiusSquared;
    ymax = c.height;
    xmax = c.width;

    // initialize ray paths
    inRange = pastrInRange();
    findRayPaths();
  }