@Override public void trigger(ChipState chip) { if (chip.get(0)) { chip.set(3, chip.get(1)); } if (chip.get(2)) { chip.set(3, false); } }
@Override public void trigger(ChipState chip) { boolean set = chip.get(0); boolean reset = chip.get(1); if (!set && !reset) { chip.set(3, true); } else if (set && !reset) { chip.set(3, false); } else if (!set && reset) { chip.set(3, true); } }