package studycave.studycaverestservice.model.test.dto;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Getter;
import lombok.Setter;
import studycave.studycaverestservice.model.test.question.AnswerPuzzle;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

@Getter
@Setter
public class AnswerPuzzleSolveDTO extends AnswerPuzzle {

    @JsonIgnore
    private String[] correct = new String[10];

    private List<String> puzzles = new ArrayList<String>();

    public void generatePuzzles() {
        this.puzzles = new ArrayList(Arrays.asList(this.getCorrect()));
        Collections.shuffle(puzzles);
    }

    public AnswerPuzzleSolveDTO() {
        super();
    }
}
