Spielerando

Tell the player how close a wrong lock code is, and jam the lock after too many tries

A code lock that only says wrong makes players guess for ever or look up the answer. One that tells them how close they are makes it a small puzzle, but repeated digits are easy to count wrongly. This entry gets the hints right and adds a jam so guessing has a price.

Why this works

Feedback turns a blind guess into a small puzzle, but only if it is true. Matching exact spots first and then spending each remaining digit only once keeps repeated digits honest. The jam gives guessing a price without taking the puzzle away.

When not to use it

Skip it when the code is meant to be found elsewhere in the world and not guessed, such as a safe whose number is hidden in a letter. Then any feedback only invites guessing; accept the exact code or nothing.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 3 common mistakes and the fix
  • 43 lines of example code with 4 checks that pass
  • How your AI shows you that it works

Say this to your AI

Use the Spielerando entry "Tell the player how close a wrong lock code is, and jam the lock after too many tries" (read_entry combination-lock-feedback-and-jamming) in my game. Build it step by step, and show me how you checked that it works.

Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP