Class PathGenerator
java.lang.Object
com.deco2800.game.areas.MapGenerator.pathBuilding.PathGenerator
Generates paths between buildings using a blind search algorithm.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a PathGenerator class with a building buffer of 3PathGenerator
(BuildingGenerator bg, int buildingBuffer) Contructs a PathGenerator and generates paths between buildings. -
Method Summary
-
Field Details
-
debugInfo
-
-
Constructor Details
-
PathGenerator
Contructs a PathGenerator and generates paths between buildings.- Parameters:
bg
- an instance of BuildingGeneratorbuildingBuffer
- the minimum number of tiles away a path should always be from a building
-
PathGenerator
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
Returns all positions the path cannot be.- Returns:
- the buffer positions
-