package models;
import java.util.*;
public class SucceedSelectA {
private HandsB handsB;
private HandsA handsA;
private Map.Entry<Boolean, Map.Entry<Integer, Integer>> value;
public SucceedSelectA(HandsB handsB, HandsA handsA) {
this.handsB = handsB;
this.handsA = handsA;
}
public void inputSelectA(int guess, int attacker, int target) {
this.value = new AbstractMap.SimpleEntry<>((handsB.getValue().get(target).getKey()==guess), new AbstractMap.SimpleEntry<>(target,attacker));
this.handsA.updateSucceedSelectA(value);
this.handsB.updateSucceedSelectA(value);
}
public Map.Entry<Boolean, Map.Entry<Integer, Integer>> getValue() {
return value;
}
}