public Main() { InitializeComponent(); NodeMediator nMediator = new NodeMediator(); NodeFactory nFactory = NodeFactory.Instance; CircuitBuilder nCircuitBuilder = new CircuitBuilder(nMediator, nFactory); controller = new CircuitController(nMediator, nCircuitBuilder); }
private void PrepareAllCircuits(List <InputValue[]> reversedInputs) { int circuitFilePathsCounter = 0; foreach (var circuitFilePath in _circuitFilePaths) { CircuitBuilder circuitBuilder = new CircuitBuilder(); // Loop over file array and prepareCircuit for each file circuitBuilder.PrepareCircuit(circuitFilePath); if (circuitBuilder._inCorrectCircuit) { _incorrectSimulator = true; return; } Circuit circuit = circuitBuilder.GetCircuit(); // Initialize inputs of circuit InitializeInputs(circuitFilePathsCounter, circuit, reversedInputs); circuitFilePathsCounter++; } }
public CircuitController(NodeMediator mediator, CircuitBuilder circuit) { _NodeMediator = mediator; _CircuitBuilder = circuit; }