Class AMaze3DGenerator

java.lang.Object
mazealgo.model.algorithms.maze3D.AMaze3DGenerator
All Implemented Interfaces:
IMaze3DGenerator
Direct Known Subclasses:
MyMaze3DGenerator

public abstract class AMaze3DGenerator extends Object implements IMaze3DGenerator
Base class for 3D maze generators. Subclasses implement generate(); time measurement and dimension sanitization are shared here.
  • Constructor Details

    • AMaze3DGenerator

      public AMaze3DGenerator()
  • Method Details

    • generate

      public abstract Maze3D generate(int depth, int rows, int columns)
      Description copied from interface: IMaze3DGenerator
      Generates a 3D maze with the given depth, rows and columns.
      Specified by:
      generate in interface IMaze3DGenerator
    • measureAlgorithmTimeMillis

      public long measureAlgorithmTimeMillis(int depth, int rows, int columns)
      Description copied from interface: IMaze3DGenerator
      Returns how long generate(depth, rows, columns) takes, in milliseconds.
      Specified by:
      measureAlgorithmTimeMillis in interface IMaze3DGenerator
    • sanitize

      protected static int[] sanitize(int depth, int rows, int columns)