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.handsB.updateSucceedSelectA(value); this.handsA.updateSucceedSelectA(value); } public Map.Entry<Boolean, Map.Entry<Integer, Integer>> getValue() { return value; } }