code: final void resize(int newWidth, int newHeight)
      {
          final int oldWidth = widthInTile;
          final int oldheight = heightInTile;
  
          // Adjust height
          for (int v = 0; v < newHeight - oldheight; v++)
          {
              tiles.add(new ArrayList<Tile>(newWidth));
          }
          // Adjust width
          for (int v = 0; v < newHeight; v++)
          {
              final int width;
              if (v < oldheight)
              {
                  width = newWidth - oldWidth;
              }
              else
              {
                  width = newWidth;
              }
              for (int h = 0; h < width; h++)
              {
                  tiles.get(v).add(null);
              }
          }
  
          widthInTile = newWidth;
          heightInTile = newHeight;
          radius = (int) Math.ceil(StrictMath.sqrt(newWidth * (double) newWidth + newHeight * (double) newHeight));
      }
docs: Resize map with new size.
  
  @param newWidth The new width in tile.
  @param newHeight The new height in tile.