protected bool Equals(Instruction other) { foreach (var otherWire in other.InputWires) { if (!InputWires.Contains(otherWire)) { return(false); } } return(Equals(CircuitGate, other.CircuitGate) && Equals(OutputWire, other.OutputWire)); }
public override int GetHashCode() { return(InputWires.GetHashCode() ^ CircuitGate.GetHashCode() ^ OutputWire.GetHashCode()); }