Package webb.shared.dtos.puzzle.updated
Class UpdatePuzzleLevelDTO
java.lang.Object
webb.shared.dtos.puzzle.created.CreatePuzzleLevelDTO
webb.shared.dtos.puzzle.updated.UpdatePuzzleLevelDTO
- Direct Known Subclasses:
PuzzleLevelDTO
Represents a puzzle from the JSON file.
Modified from: https://cs.plu.edu/courses/protected/cs390/2023s/project/iteration2.html
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintvoidsetSolvedByNumPlayers(int solvedByNumPlayers) Unsure if this is needed as of now, but I am adding it.toString()Methods inherited from class webb.shared.dtos.puzzle.created.CreatePuzzleLevelDTO
getGridSize, getNumStars, getRegions, getSolution, getTotalStars
-
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 CellDTOsolution- the solution to the puzzle as a list of CellDTOgridSize- the size of the gridnumStars- the number of stars per regionsolvedByNumPlayers- 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
- Overrides:
toStringin classCreatePuzzleLevelDTO
-