How pelipeli2/s194749wheeloffortune works
This repo is a single-module Android application written in Kotlin, implementing a “Wheel of Fortune”-style word guessing game. Architecturally it’s a client-only/offline app: there is no backend, no database, and no external services. The core of the system is a Fragment-based UI flow orchestrated by Jetpack Navigation, with most game state and business logic implemented directly inside GameFragment.
• Runtime container: Android OS → App process
• UI host: MainActivity + NavHostFragment
• Screens (Fragments) and navigation graph
• Game logic + state (lives, score, current word/category, guessed letters)
• Resources (layouts, strings) that the UI depends on
• Build/dependency layer (Gradle, AndroidX, Navigation)
File structure analysis (what to map into components)
From the tree + README, the meaningful architectural units are:
Application module
• app/ (single Android app module)
• src/main/java/...
• MainActivity.kt (activity host)
• TitleFragment.kt (start screen)
• GameFragment.kt (main logic)
• wonGame.kt (win screen)
• Lostgame.kt (lose screen)
• src/main/res/
• layout/ → activity_main.xml, fragment layouts
• navigation/navigation.xml → navigation graph (key architectural artifact)
• AndroidManifest.xml (app entry + activity declaration)
Build / tooling
• Root build.gradle, settings.gradle, gradle/wrapper/*
• App app/build.gradle (dependencies: AndroidX, Navigation KTX, etc.)
Tests
• src/test unit test scaffold
• src/androidTest instrumented test scaffold
README-derived architecture cues
The README explicitly defines the screen flow:
win/lose → return to title
It also flags an important design constraint:
• Word lists/categories are hardcoded in GameFragment (so “data source” is in-memory, local)
Concrete checklist of what to include (to be “very detailed”)
Nodes
• Android OS
• MainActivity
• activity_main.xml
• NavHostFragment
• navigation.xml
• TitleFragment + fragment_title.xml
• GameFragment + fragment_game.xml
• wonGame + fragment_won_game.xml
• Lostgame + fragment_lostgame.xml
• GameFragment subnodes:
• Category/Word Lists (hardcoded)
• RNG / Wheel Outcome
• Guess Validator
• Score/Lives/Mask State (in-memory)
• Win/Lose Evaluator
Edges
• OS → MainActivity (launch)
• MainActivity → NavHostFragment (host)
• NavHostFragment → navigation.xml (reads graph)
• navigation.xml → each Fragment (destination mapping)
• Each Fragment → its layout (inflate)
• TitleFragment → GameFragment (Start)
• GameFragment → wonGame (win)
• GameFragment → Lostgame (lose)
• wonGame → TitleFragment (play again)
• Lostgame → TitleFragment (try again)
• GameFragment: Spin/Guess → state update → UI update → win/lose decision