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