How icyss999/hang-man-python works
This is a terminal Hangman game: players select a category, guess a word, and can view a top-10 leaderboard. The menu in app/main.py orchestrates play and leaderboard actions; utils/game_track.py manages rounds, while utils/gui.py renders screens. Successful rounds and player names are persisted through the leaderboard layer to SQLite. The README documents how to launch the app but no additional product capabilities. The graph follows the sampled calls; database schema creation is shown, but no runtime connection to the migrations or mock-data directory is evidenced.
Main entry points: main.py Game menu · game_track.py Guessing round · leaderboard.py Leaderboard logic · word_bank.py Category selection
Components 8
Game interaction
- Game menu
app/main.py - Category selection
utils/word_bank.py - Guessing round
utils/game_track.py
Terminal presentation
- Game screens
utils/gui.py - Time formatting
utils/gui.py
Player records
- Leaderboard logic
utils/leaderboard.py - SQLite database
db/index.py
Other components
- Player
Connections 11
- Player → Game menu: chooses action
app/main.py - Game menu → Category selection: chooses word
app/main.py - Game menu → Guessing round: starts round
app/main.py - Guessing round → Game screens: renders screens
utils/game_track.py - Player → Guessing round: enters guesses
utils/game_track.py - Guessing round → Game menu: returns result
app/main.py - Game menu → Leaderboard logic: stores player
app/main.py - Game menu → Leaderboard logic: stores result
app/main.py - Game menu → Leaderboard logic: requests rankings
app/main.py - Leaderboard logic → SQLite database: reads and writes
utils/leaderboard.py - Game menu → Time formatting: formats times
app/main.py