Cleanup
[Mograsim.git] / era.mi / src / era / mi / logic / tests / Connector.java
index 9a8d3fc..39645bf 100644 (file)
@@ -2,18 +2,18 @@ package era.mi.logic.tests;
 
 import era.mi.logic.Bit;
 import era.mi.logic.Simulation;
-import era.mi.logic.wires.WireArray;
-import era.mi.logic.wires.WireArray.WireArrayEnd;
-import era.mi.logic.wires.WireArrayObserver;
+import era.mi.logic.wires.Wire;
+import era.mi.logic.wires.Wire.WireEnd;
+import era.mi.logic.wires.WireObserver;
 
-public class Connector implements WireArrayObserver
+public class Connector implements WireObserver
 {
-       private final WireArray a;
+       private final Wire a;
 //     private final WireArray b;
-       private final WireArrayEnd aI;
-       private final WireArrayEnd bI;
+       private final WireEnd aI;
+       private final WireEnd bI;
 
-       public Connector(WireArray a, WireArray b)
+       public Connector(Wire a, Wire b)
        {
                if (a.length != b.length)
                        throw new IllegalArgumentException(String.format("WireArray width does not match: %d, %d", a.length, b.length));
@@ -21,12 +21,12 @@ public class Connector implements WireArrayObserver
 //             this.b = b;
                a.addObserver(this);
                b.addObserver(this);
-               aI = a.createInput();
-               bI = b.createInput();
+               aI = a.createEnd();
+               bI = b.createEnd();
        }
 
        @Override
-       public void update(WireArray initiator, Bit[] oldValues)
+       public void update(Wire initiator, Bit[] oldValues)
        {
                Simulation.TIMELINE.addEvent((e) ->
                {