code: @Override
      public void apply(MapTile map)
      {
          final MapTileTransition mapTransition = map.getFeature(MapTileTransition.class);
          final double tw = map.getTileWidth();
          final double th = map.getTileHeight();
          final int sx = area.getInTileX();
          final int sy = area.getInTileY();
          final int ex = UtilMath.clamp(area.getInTileWidth(), 0, map.getInTileWidth() - 1);
          final int ey = UtilMath.clamp(area.getInTileHeight(), 0, map.getInTileHeight() - 1);
  
          int remaining = count;
          while (remaining > 0)
          {
              final double tx = UtilRandom.getRandomInteger(sx, ex);
              final double ty = UtilRandom.getRandomInteger(sy, ey);
  
              final int size = UtilRandom.getRandomInteger(maxSize);
              final int halfBottom = (int) Math.floor(size / 2.0);
              final int halfTop = (int) Math.ceil(size / 2.0);
              for (int ox = -halfBottom; ox < halfTop; ox++)
              {
                  for (int oy = -halfBottom; oy < halfTop; oy++)
                  {
                      final double x = UtilMath.clamp(tx + ox, sx, ex) * tw;
                      final double y = UtilMath.clamp(ty + oy, sy, ey) * th;
                      final Tile tile = map.createTile(sheet, number, x, y);
                      map.setTile(tile);
                      mapTransition.resolve(tile);
                  }
              }
  
              remaining--;
          }
      }
docs: /*
  Preference