WorldMapGenerator.withTiles constructor

WorldMapGenerator.withTiles(
  1. WorldMapSettings settings,
  2. int width,
  3. int height
)

NOTE: This feature is experimental and might not work

Implementation

factory WorldMapGenerator.withTiles(
    WorldMapSettings settings, int width, int height) {
  if (width % _tileSize != 0 || height % _tileSize != 0) {
    throw ArgumentError(
        "Width and height must be divisible by $_tileSize when using tiles");
  }
  final generator = WorldMapGenerator(settings, width, height);
  generator._useTiles = true;
  return generator;
}