java.lang.Object
com.deco2800.game.areas.MapGenerator.pathBuilding.PathGenerator

public class PathGenerator extends Object
Generates paths between buildings using a blind search algorithm.
  • Field Details

    • debugInfo

      public static String debugInfo
  • Constructor Details

    • PathGenerator

      public PathGenerator(BuildingGenerator bg, int buildingBuffer)
      Contructs a PathGenerator and generates paths between buildings.
      Parameters:
      bg - an instance of BuildingGenerator
      buildingBuffer - the minimum number of tiles away a path should always be from a building
    • PathGenerator

      public PathGenerator(BuildingGenerator bg)
      Constructs a PathGenerator class with a building buffer of 3
      Parameters:
      bg - an instance of BuildingGenerator
  • Method Details

    • getCity

      public char[][] getCity()
      Returns the city as an array.
      Returns:
      city array
    • getPathTile

      public char getPathTile()
      Returns the path tile character.
      Returns:
      the path tile
    • getBufferPositions

      public List<com.badlogic.gdx.math.GridPoint2> getBufferPositions()
      Returns all positions the path cannot be.
      Returns:
      the buffer positions