Fixed calculations concerning U, tests work now just like before
[Mograsim.git] / era.mi / src / era / mi / logic / tests / Connector.java
index c843237..5e9c576 100644 (file)
@@ -1,23 +1,24 @@
 package era.mi.logic.tests;\r
 \r
+import era.mi.logic.Bit;\r
 import era.mi.logic.Simulation;\r
 import era.mi.logic.wires.WireArray;\r
-import era.mi.logic.wires.WireArray.WireArrayInput;\r
+import era.mi.logic.wires.WireArray.WireArrayEnd;\r
 import era.mi.logic.wires.WireArrayObserver;\r
 \r
 public class Connector implements WireArrayObserver\r
 {\r
        private final WireArray a;\r
-       private final WireArray b;\r
-       private final WireArrayInput aI;\r
-       private final WireArrayInput bI;\r
+//     private final WireArray b;\r
+       private final WireArrayEnd aI;\r
+       private final WireArrayEnd bI;\r
 \r
        public Connector(WireArray a, WireArray b)\r
        {\r
                if (a.length != b.length)\r
-                       throw new IllegalArgumentException("WireArray width does not match: " + a.length + ", " + b.length);\r
+                       throw new IllegalArgumentException(String.format("WireArray width does not match: %d, %d", a.length, b.length));\r
                this.a = a;\r
-               this.b = b;\r
+//             this.b = b;\r
                a.addObserver(this);\r
                b.addObserver(this);\r
                aI = a.createInput();\r
@@ -25,7 +26,7 @@ public class Connector implements WireArrayObserver
        }\r
 \r
        @Override\r
-       public void update(WireArray initiator)\r
+       public void update(WireArray initiator, Bit[] oldValues)\r
        {\r
                Simulation.TIMELINE.addEvent((e) ->\r
                {\r