digital_electricity: Allow update multiple times
Previously, each of the components were updated only once whenever
any component of the circuit was changed. This was maintained via a
keeping a note of which components were visited, and if a component
needs to be updated which is already visited previously, the update
procedure for that component was stopped.
However, as it turned out, multiple update of a component is required
in case of components with multiple input lines. As an example, if we
consider the implementation of the following logic:
AB' + A'B
For implementing this, we come across this scenario:
___AND_____ / \
/ \
X---NOT---AND---OR--DIGITAL_LIGHT
Here,
X = An input, either A or B
Now, when the value of X is changed, both the NOT and AND gate needs to
be updated, the sequence of updates following the previous rules are as
follows:
X--AND--OR--DIGITAL_LIGHT
X--NOT--AND--OR--(BLOCKED, DIGITAL_LIGHT is already updated)
Thus, the DIGITAL_LIGHT is not being updated to the latest value, thus
producing incorrect results
Signed-off-by: Rudra Nil Basu <rudra.nil.basu.1996@gmail.com>