Package math.wfc

Class WFC_Handler

java.lang.Object
math.wfc.WFC_Handler

public class WFC_Handler extends Object
Class that handles the main Wave function collapse operations.
  • Constructor Details

    • WFC_Handler

      public WFC_Handler(int w, int h, Tile[] tileset)
      Constructor for a WFC Handler
      Parameters:
      w - width of grid
      h - height of grid
      tileset - tileset to fill the grid with
    • WFC_Handler

      public WFC_Handler(Gridstate g)
  • Method Details

    • wfc

      public boolean wfc()
      Runs Wave function collapse algorithm.
      Returns:
      true if the algorithm terminted successfully otherwise false
    • getGrid

      public Tile[][] getGrid()
      A function to get the finished Grid.
      Returns:
      Grid of tiles
    • printGrid

      public void printGrid()
      Prints the current Grid.