code_crack 
-
A code-cracking puzzle gizmo
-
First, the user must pulse activate_puzzle - this randomizes the code and resets the attempt counter.
-
The user may pulse activate_puzzle a limited amount of times again to retry it.
-
Next, the user needs to input a code.
-
Imagine a row of knobs, each of them with 10 notches, and a head that rotates the knobs.
-
Pulsing cycle_position moves the head right,
-
pulsing cycle_digit makes the head bump the knob by 1 notch.
-
If the head reaches the rightmost position, then cycle_position resets it, moving it back left.
-
Similarly, pulsing cycle_digit when the knob is already in the rightmost notch resets it to the leftmost one.
-
Finally, the user has to pulse try_crack to check if their input is correct.
-
If it's correct, a reward is dispensed and the puzzle gets deactivated.
-
If it's not, some sort of feedback is provided.
-
If the user takes too many attempts to solve the code, they are punished.
-
There may be restrictions set upon the code.
-
These are checked upon code generation and cracking attempt.