package models;
import java.util.*;
public class Deck {
private List<Map.Entry<Integer, Boolean>> value = new ArrayList<>();
public void drawB(int guess, List<Map.Entry<Integer, Boolean>> a, List<Map.Entry<Integer, Boolean>> d, int target) {
this.value = this.value.subList(1, this.value.size());
}
public void drawA(int guess, List<Map.Entry<Integer, Boolean>> b, List<Map.Entry<Integer, Boolean>> d, int target) {
this.value = this.value.subList(1, this.value.size());
}
//added
public void reset(int num){
for(int i=0;i<num;i++){
this.value.add(new AbstractMap.SimpleEntry<>(i,false));
}
Collections.shuffle(this.value);
}
//added
public Map.Entry<Integer, Boolean> head(){
var card=getValue().get(0);
getValue().remove(getValue().get(0));
return card;
}
public List<Map.Entry<Integer, Boolean>> getValue() {
return value;
}
}