From fb4ba46a7fa9055a7848d8e0fa3daed2ce0b014f Mon Sep 17 00:00:00 2001 From: omagdy7 Date: Wed, 29 Nov 2023 00:11:39 +0200 Subject: Changed Chip structure and added pins which represents the chips input pins and output pins and added input and output to reference th ids of those input and output pins --- src/gate.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/gate.rs b/src/gate.rs index b42a125..3925a45 100644 --- a/src/gate.rs +++ b/src/gate.rs @@ -291,8 +291,9 @@ impl NotGate { pub struct Chip { pub gates: Gates, pub connections: Connections, - input: Pins, - output: Pins, + pins: HashMap, + input: Vec, + output: Vec, } impl Chip { @@ -300,8 +301,9 @@ impl Chip { Chip { gates: Gates::new(), connections: HashMap::new(), - input: Pins::new(), - output: Pins::new(), + pins: HashMap::new(), + input: vec![], + output: vec![], } } -- cgit v1.2.3