How 6gdav/hangingtree works
HangingTree is a small browser-based Hangman game. The player opens the game page, submits individual letter guesses or a full-word guess, and sees the word and hangman state update; winning or reaching the error limit triggers a reset. The game logic and presentation are together in one route component, which uses static images for the hangman states. The sampled source shows no backend or persistent storage.
Main entry points: +page.svelte Hangman Game · +layout.svelte App Layout · hangman_states Hangman States
Components 5
App Routes
- App Layout
src/routes/+layout.svelte - Hangman Game
src/routes/+page.svelte - Error Page
src/routes/+error.svelte
Game Assets
- Hangman States
static/hangman_states
Other components
- Player
Connections 4
- Player → App Layout: opens app
- App Layout → Hangman Game: renders route
- Player → Hangman Game: submits guesses
- Hangman Game → Hangman States: loads state image