Class UpdatePuzzleLevelDTO

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

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

    • UpdatePuzzleLevelDTO

      public UpdatePuzzleLevelDTO(List<List<CellDTO>> regions, List<CellDTO> solution, int gridSize, int numStars, int solvedByNumPlayers)
      UpdatePuzzleLevelDTO constructor
      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
      solvedByNumPlayers - the number of players who have solved the puzzle
  • Method Details

    • getSolvedByNumPlayers

      public int getSolvedByNumPlayers()
      Returns:
      the number of players who have solved the puzzle
    • setSolvedByNumPlayers

      public void setSolvedByNumPlayers(int solvedByNumPlayers)
      Unsure if this is needed as of now, but I am adding it.
      Parameters:
      solvedByNumPlayers - the number of players who have solved the puzzle
    • toString

      public String toString()
      Overrides:
      toString in class CreatePuzzleLevelDTO