Interface IMazeModel

All Known Implementing Classes:
MazeModel

public interface IMazeModel
Interface for MazeModel. Specifies the methods that the MazeModel should implement. These include methods for getting and setting rows, columns, goal coordinates, and methods for generating and accessing the maze structure.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Generates the maze using the randomized Prime's algorithm.
    int
    Gets the number of columns in the maze.
    int
    Gets the x-coordinate of the goal position in the maze.
    int
    Gets the y-coordinate of the goal position in the maze.
    int[][]
    Gets the maze structure as a two-dimensional array.
    int
    Gets the number of rows in the maze.
    int
    Gets the x-coordinate of the start position in the maze.
    int
    Gets the y-coordinate of the start position in the maze.
    void
    setCols(int cols)
    Sets the number of columns in the maze.
    void
    setRows(int rows)
    Sets the number of rows in the maze.
  • Method Details

    • getRows

      int getRows()
      Gets the number of rows in the maze.
      Returns:
      The number of rows.
    • setRows

      void setRows(int rows)
      Sets the number of rows in the maze.
      Parameters:
      rows - The number of rows to set.
    • getCols

      int getCols()
      Gets the number of columns in the maze.
      Returns:
      The number of columns.
    • setCols

      void setCols(int cols)
      Sets the number of columns in the maze.
      Parameters:
      cols - The number of columns to set.
    • getGoalX

      int getGoalX()
      Gets the x-coordinate of the goal position in the maze.
      Returns:
      The x-coordinate of the goal.
    • getGoalY

      int getGoalY()
      Gets the y-coordinate of the goal position in the maze.
      Returns:
      The y-coordinate of the goal.
    • getStartX

      int getStartX()
      Gets the x-coordinate of the start position in the maze.
      Returns:
      The x-coordinate of the start.
    • getStartY

      int getStartY()
      Gets the y-coordinate of the start position in the maze.
      Returns:
      The y-coordinate of the start.
    • getMaze

      int[][] getMaze()
      Gets the maze structure as a two-dimensional array. 0 means the cell is accessible, 1 means the cell is a wall.
      Returns:
      The maze structure.
    • generateMaze

      void generateMaze()
      Generates the maze using the randomized Prime's algorithm.