code: public void create(MapTile map, Media config, SpriteTiled sheet)
      {
          this.map.create(map.getTileWidth(), map.getTileHeight(), map.getInTileWidth(), map.getInTileHeight());
          if (sheet != null)
          {
              this.map.loadSheets(Arrays.asList(sheet));
          }
          for (int i = 0; i < NO_FOG; i++)
          {
              final String group;
              if (i == FOG)
              {
                  group = FOG_GROUP;
              }
              else
              {
                  group = TRANSITION_GROUP;
              }
              mapGroup.changeGroup(new TileGame(Integer.valueOf(0), i, 0, 0, map.getTileWidth(), map.getTileHeight()),
                                   group);
          }
          mapGroup.changeGroup(new TileGame(Integer.valueOf(0), NO_FOG, 0, 0, map.getTileWidth(), map.getTileHeight()),
                               MapTileGroupModel.NO_GROUP_NAME);
          transition.loadTransitions(config);
  
          for (int x = 0; x < map.getInTileWidth(); x++)
          {
              for (int y = 0; y < map.getInTileHeight(); y++)
              {
                  final Tile tile = new TileGame(Integer.valueOf(0),
                                                 FOG,
                                                 x * (double) map.getTileWidth(),
                                                 y * (double) map.getTileHeight(),
                                                 map.getTileWidth(),
                                                 map.getTileHeight());
                  this.map.setTile(tile);
              }
          }
      }
docs: Create a fog of war from a map.
  
  @param map The map reference.
  @param config The fog configuration.
  @param sheet The sheet used (can be <code>null</code>).