@Override
  public void trigger(ChipState chip) {

    if (chip.getInput(2)) {
      chip.setOutput(0, false);
    } else if (chip.getInput(1) && chip.isTriggered(1)) {
      chip.setOutput(0, chip.getInput(0));
    }
  }
Beispiel #2
0
  @Override
  public void trigger(ChipState chip) {

    boolean value = chip.getInput(0);
    boolean targetB = chip.getInput(1);
    boolean targetC = chip.getInput(2);

    if (targetB) {
      chip.setOutput(1, value);
    }
    if (targetC) {
      chip.setOutput(2, value);
    }
  }
Beispiel #3
0
  @Override
  public void trigger(ChipState chip) {

    if (chip.getInput(0)) {
      chip.setOutput(0, shoot());
    }
  }
Beispiel #4
0
  @Override
  public void trigger(ChipState chip) {

    if (chip.getInput(0)) {
      setDoor(true);
    } else {
      setDoor(false);
    }

    chip.setOutput(0, chip.getInput(0));
  }
  @Override
  public void think(ChipState chip) {

    chip.setOutput(0, stock());
  }
  @Override
  public void trigger(ChipState chip) {

    if (chip.getInput(0)) chip.setOutput(0, stock());
  }
 @Override
 public void think(ChipState chip) {
   chip.setOutput(0, collect());
 }
Beispiel #8
0
  @Override
  public void think(ChipState state) {

    state.setOutput(0, isDetected());
  }
Beispiel #9
0
  @Override
  public void trigger(ChipState chip) {

    chip.setOutput(0, chip.getInput(0));
  }
  @Override
  public void think(ChipState chip) {

    chip.setOutput(0, harvest());
  }
Beispiel #11
0
  @Override
  public void trigger(ChipState chip) {

    if (chip.getInput(0)) chip.setOutput(0, invertOutput ? !isDetected() : isDetected());
  }