package com.gynt.wordcoach.model;

import java.util.Arrays;

public class ProcessedAnswer {

	public enum Code {
		CORRECT, INCORRECT, ALMOST;
	}

	private Code code;
	private String feedback;
	private Boolean[] validation;
	private String answer;

	ProcessedAnswer(Code code, String feedback, Boolean[] validation, String answer) {
		this.code = code;
		this.feedback = feedback;
		this.validation = validation;
		this.answer = answer;
	}

	public boolean isCorrect() {
		return code == Code.CORRECT;
	}

	public int getCode() {
		return Arrays.asList(Code.values()).indexOf(code);
	}

	public String getFeedback() {
		return feedback;
	}

	public Boolean[] getValidation() {
		return validation;
	}

	public String getAnswer() {
		return answer;
	}

}
