Sorry to be so offtopic (BTW the code does look elegant!
But I do question the wisdom of resetting the lock at every mistake. That's just frustrating, and the player already has the numbers, right? So why not make use of the fact that this is a game and magically put/keep the numbers correct?
But I do question the wisdom of resetting the lock at every mistake. That's just frustrating, and the player already has the numbers, right? So why not make use of the fact that this is a game and magically put/keep the numbers correct?