(clockIn bool)
| 61 | } |
| 62 | |
| 63 | func (s *Stepper) Update(clockIn bool) { |
| 64 | s.clockIn.Update(clockIn) |
| 65 | s.reset.Update(s.outputs[6].Get()) |
| 66 | |
| 67 | s.step() |
| 68 | |
| 69 | // reset is instant so should do it immediately |
| 70 | if s.outputs[6].Get() { |
| 71 | s.reset.Update(s.outputs[6].Get()) |
| 72 | s.step() |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | func (s *Stepper) step() { |
| 77 | s.clockInNotGate.Update(s.clockIn.Get()) |