How nahomtesfay212025-cmyk/ai110-module1show-gameglitchinvestigator-starter works
This repository is a Streamlit number-guessing game and debugging exercise. The player chooses a difficulty, submits guesses, receives higher/lower or win feedback, and can start a new game; the app tracks the secret, attempts, score, status, and history in Streamlit session state. It also exposes developer debug information. The shared game helpers in logic_utils.py duplicate functions in app.py, but the sampled source shows no import or runtime connection between them. Tests and setup files are omitted.
Main entry points: app.py Game control
Components 12
Game flow
- Difficulty settings
app.py - Guess interface
app.py - Game control
app.py - Game feedback
app.py - Debug info
app.py
Game state
- Session state
app.py
Game logic
- Secret generation
app.py - Guess parsing
app.py - Guess evaluation
app.py - Score update
app.py - Shared game helpers
logic_utils.py
Other components
- Player
Connections 13
- Player → Difficulty settings: chooses difficulty
app.py - Player → Guess interface: submits guess
app.py - Player → Game control: starts new game
app.py - Difficulty settings → Game control: sets range and limit
app.py - Game control → Session state: reads and updates
app.py - Game control → Secret generation: generates secret
app.py - Guess interface → Game control: submits input
app.py - Game control → Guess parsing: parses input
app.py - Game control → Guess evaluation: checks valid guess
app.py - Game control → Score update: updates score
app.py - Game control → Game feedback: displays outcome
app.py - Game control → Debug info: displays state
app.py - Debug info → Session state: reads game values
app.py