Skip to content

mosmb/LoupGarouNarrateur

Repository files navigation

Loup-Garou Narrateur

Android Werewolf game narrator app built with Kotlin, Jetpack Compose, Hilt, and a clean architecture approach. The app guides a full game of Loup-Garou with spoken narration in French.

Features

  • End-to-end game flow: setup, role reveal, night, day, vote, hunter revenge, and game over
  • French text-to-speech narration for all phases
  • Role assignment and night actions (voyante, loups-garous, sorciere)
  • Voting and win condition resolution
  • Offline persistence via Room (game state + players)
  • Modern Compose UI with animated transitions and themed visuals

Architecture

Clean architecture with a strict dependency chain:

ViewModel -> Use Cases -> Repository -> Local Data Source (Room)

Key elements:

  • domain/ contains game models, use cases, and domain services (GameNarrator)
  • data/ contains Room entities/DAO, mappers, and GameStateLocalDataSource
  • repository/ persists and exposes the current GameState as StateFlow
  • ui/ holds Compose screens and viewmodels
  • Narration layering:
    • NarrationTextsProvider (domain) -> NarrationTextsLocalDataSource (data)
    • GameNarrator builds narration from state
    • Narrator (domain) -> NarrationService (Android TTS)

State is split for clarity:

  • GameState.day (DayState): day number, votes, hunter revenge flag
  • GameState.night (NightState): current night step, werewolf target

How To Use

Run the App

./gradlew assembleDebug

Install the APK:

app/build/outputs/apk/debug/app-debug.apk

Gameplay Flow

  1. Add players on the setup screen.
  2. Configure roles and confirm.
  3. Reveal roles one by one.
  4. Night phase: handle seer, werewolves, and witch actions.
  5. Day phase: announcement, debate, vote, and possible hunter revenge.
  6. Repeat night/day until a win condition is reached.
  7. Start a new game from the game over screen.

Development

./gradlew assembleDebug          # Build debug APK
./gradlew test                   # Run unit tests
./gradlew connectedAndroidTest   # Run instrumented tests
./gradlew lint                   # Run Android lint

Tech Stack

  • Kotlin 2.0, Jetpack Compose, Material 3
  • Hilt for DI
  • Room for local persistence
  • Kotlinx Serialization for role persistence
  • Coroutines + StateFlow
  • Android TextToSpeech (French locale)

About

Offline Android narrator for Loup-Garou that runs a full game flow with French TTS, built with Kotlin + Jetpack Compose, Hilt, Room, and Clean Architecture.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages