Skip to content

GateKind

namespace Griff.Modules.Contraptions;
public enum GateKind

What a WireGate does with its inputs.

  • And = 0: On while both A and B are on.
  • Or = 1: On while A or B (or both) is on.
  • Not = 2: On while A is off.
  • Xor = 3: On while just one of A and B is on.
  • Nand = 4: Off only while both A and B are on.
  • Nor = 5: On only while neither A nor B is on.
  • Add = 6: A plus B.
  • Subtract = 7: A minus B.
  • Multiply = 8: A times B.
  • Divide = 9: A divided by B (0 when B is 0).
  • Greater = 10: On while A is more than B.
  • Less = 11: On while A is less than B.
  • Equal = 12: On while A equals B.
  • Constant = 13: Always Value.
  • Toggle = 14: Flips on and off each time A turns on: makes a push button a light switch.
  • Latch = 15: A turns it on and B turns it off, and it stays that way in between.
  • Delay = 16: A, Value seconds later.
  • Clock = 17: Ticks on and off every Value seconds, while A is on (or not wired).
  • Counter = 18: Counts up each time A turns on; B turns it back to 0.