public static Area getArea(double robotX, double robotY, double battleFiledWidth,
        double battleFieldHeight, double widthOffset, double heightOffset) {
      boolean nearWallXMin = robotX < widthOffset;
      boolean nearWallXMax = robotX > battleFiledWidth - widthOffset;
      boolean nearWallYMin = robotY < heightOffset;
      boolean nearWallYMax = robotY > battleFieldHeight - heightOffset;
      if (nearWallYMax) {
        if (nearWallXMax) {
          return Area.valueOf(1);
        }
        else if (nearWallXMin) {
          return Area.valueOf(7);
        }
        else {
          return Area.valueOf(0);
        }
      }
      else if (nearWallYMin) {
        if (nearWallXMax) {
          return Area.valueOf(3);
        }
        else if (nearWallXMin) {
          return Area.valueOf(5);
        }
        else {
          return Area.valueOf(4);
        }
      }
      else {
        if (nearWallXMax) {
          return Area.valueOf(2);
        }
        else if (nearWallXMin) {
          return Area.valueOf(6);
        }
        else {
          return Area.valueOf(-1);
        }
      }
    }