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