Let's talk ↗
← All projects

Bootcamp · Mar 2026

Game Glitch Investigator

I fixed a number-guessing game whose hints pointed the wrong way, and I replaced the score with a simple 0 to 100.

A guessing game that tells you to go higher when you are already too high is not a game. It is a bug with a score attached.

The problem

The hints were reversed. Too high said go higher. The secret also changed on every rerun, because it was not kept in session state, so a guess was aimed at a number that had already left. New Game did not refresh the page. The score survived a new game, and a difficulty change could leave the secret outside the new range.

That is a player who cannot tell a wrong guess from a broken game. It was worth fixing because each of those failures looks like the others. You follow the hint, the number moves, and the score refuses to die. None of that is a rule of the game.

How I built it

The page is Streamlit. I kept the secret in session state so a rerun of the script does not roll a new number while you are still guessing. The hint now points the way the comparison actually went: too high means lower, too low means higher.

New Game has to restart the round. Before, it left the old secret and the old score in place and hoped the page would notice. A restart clears the secret and the score together. Otherwise a new game is the previous game with a different label.

The score starts at 100 and steps down toward 0 by the number of tries. A difficulty change has to roll a secret inside the new range. Leaving the old secret in place is how you get a target the new rules cannot reach, and a hint that can never be satisfied.

Challenges and what I learned

The hint, the secret, and the score were three separate failures. Fixing the words on the hint would still have left a secret that moved and a score that refused to die. Session state is why the secret stays, and why New Game has to be the thing that clears it.

RECOMMENDED

More like Game Glitch Investigator