Interface IDungeonGenerator

All Known Implementing Classes:
BasicCaveGenerator, ClassicRogueMapGenerator, ConnectingMapGenerator, DenseRoomMapGenerator, DividedMazeGenerator, DungeonGenerator, FlowingCaveGenerator, GrowingTreeMazeGenerator, LanesMapGenerator, MixedGenerator, ModularMapGenerator, OrganicMapGenerator, SectionDungeonGenerator, SerpentMapGenerator, SymmetryDungeonGenerator, ThinDungeonGenerator

public interface IDungeonGenerator
Created by Tommy Ettinger on 6/1/2017.
  • Method Summary

    Modifier and Type Method Description
    char[][] generate()
    Generates a dungeon or other map as a 2D char array.
    char[][] getDungeon()
    Gets the most recently-produced dungeon as a 2D char array, usually produced by calling generate() or some similar method present in a specific implementation.
  • Method Details

    • generate

      char[][] generate()
      Generates a dungeon or other map as a 2D char array. Any implementation may allow its own configuration and customization of how dungeons are generated, but each must provide this as a sane default. Most implementations should use the convention of '#' representing a wall and '.' representing a bare floor, but beyond that, anything could be present in the char array.
      Returns:
      a 2D char array representing some kind of map, probably using standard conventions for walls/floors
    • getDungeon

      char[][] getDungeon()
      Gets the most recently-produced dungeon as a 2D char array, usually produced by calling generate() or some similar method present in a specific implementation. This normally passes a direct reference and not a copy, so you can normally modify the returned array to propagate changes back into this IDungeonGenerator.
      Returns:
      the most recently-produced dungeon/map as a 2D char array