public bool ShouldWireBeSnipped(VennWireComponent component, int indexOfCutWire, bool log) { VennSnippableWire wire = null; foreach (VennSnippableWire vennSnippableWire in component.ActiveWires) { if (indexOfCutWire == vennSnippableWire.WireIndex) { wire = vennSnippableWire; break; } } CutInstruction cutInstructionForWire = this.GetCutInstructionForWire(component, wire, log); return(this.ShouldCut(component, cutInstructionForWire)); }
protected CutInstruction GetCutInstructionForWire(VennWireComponent component, VennSnippableWire wire, bool log) { bool flag = (wire.Color & VennWireColor.Red) == VennWireColor.Red; bool flag2 = (wire.Color & VennWireColor.Blue) == VennWireColor.Blue; bool hasSymbol = wire.HasSymbol; bool isLEDOn = wire.IsLEDOn; return(this.RuleDict[new VennWireState(flag, flag2, hasSymbol, isLEDOn)]); }