Class CreatePuzzleLevelDTO

java.lang.Object
webb.shared.dtos.puzzle.created.CreatePuzzleLevelDTO
Direct Known Subclasses:
UpdatePuzzleLevelDTO

public class CreatePuzzleLevelDTO extends Object
Represents a puzzle from the JSON file. Modified from: https://cs.plu.edu/courses/protected/cs390/2023s/project/iteration2.html
  • Constructor Details

    • CreatePuzzleLevelDTO

      public CreatePuzzleLevelDTO(List<List<CellDTO>> regions, List<CellDTO> solution, int gridSize, int numStars)
      Constructor for CreatePuzzleLevelDTO
      Parameters:
      regions - the regions of the puzzle as a list of CellDTO
      solution - the solution to the puzzle as a list of CellDTO
      gridSize - the size of the grid
      numStars - the number of stars per region
  • Method Details

    • getRegions

      public List<List<CellDTO>> getRegions()
      Returns:
      the regions of the puzzle as a list of Cells
    • getSolution

      public List<CellDTO> getSolution()
      Returns:
      the solution to the puzzle as a list of Cells
    • getGridSize

      public int getGridSize()
      Returns:
      the size of the grid
    • getNumStars

      public int getNumStars()
      Returns:
      the number of stars per region
    • getTotalStars

      public int getTotalStars()
      Returns:
      the total number of stars in the puzzle
    • toString

      public String toString()
      Overrides:
      toString in class Object