Skip to content

About

Kid-friendly Rock Paper Scissors game in Flutter with robot opponents, English/Persian (RTL) support, Bloc and clean architecture.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Rock Paper Scissors

CI License: MIT

A kid-friendly Flutter Rock Paper Scissors game against a robot or a friend, with English and Persian (RTL) support, sound effects, and local stats.

Features

  • Face-off game screen: the robot on one side, the player on the other, big hand buttons in the thumb zone
  • "Rock… Paper… Scissors!" chant with shaking hands before every reveal
  • Three robot opponents (Robo Jr., Robo, Grumpy Robo) mapped to Easy / Normal / Hard AI, with reacting faces
  • Two-player pass-and-play on one device, with a "no peeking" handoff screen
  • 3 stars (first to 3) and Endless modes
  • Confetti, sound effects (mutable) and haptic feedback
  • English and Persian with runtime language switch; choices are remembered
  • Light, dark or follow-device theme
  • Eight badges to collect
  • Lifetime stats (favorite hand, streaks, win rate per robot) stored with shared_preferences, with reset
  • Respects the system "reduce motion" setting
  • Clean architecture: domain / data / presentation + Bloc

Getting started

Requires Flutter stable (CI pins the exact version in .github/workflows/ci.yml).

flutter pub get
flutter run

Development

dart format lib test     # format
flutter gen-l10n         # regenerate lib/l10n/app_localizations*.dart after editing ARB files
flutter analyze          # static analysis
flutter test             # unit + widget tests
flutter test --coverage  # writes coverage/lcov.info

App icon and splash

The launcher icon and splash are rendered from the in-app robot and hand artwork (tool/branding/app_icon_art.dart):

flutter test tool/generate_icon_test.dart   # writes assets/branding/*.png
dart run flutter_launcher_icons
dart run flutter_native_splash:create

See CONTRIBUTING.md for branch naming, commit style and the pull request checklist.

Android release signing

Release builds use debug keys unless android/key.properties exists.

  1. Create an upload keystore (keep it out of git; *.jks is ignored):

    keytool -genkey -v -keystore android/upload-keystore.jks \
      -keyalg RSA -keysize 2048 -validity 10000 -alias upload
  2. Copy android/key.properties.example to android/key.properties and fill in the passwords.

  3. Build: flutter build appbundle --release.

Architecture

lib/
  app.dart         # root widget; provides repositories and use cases
  main.dart        # wires SharedPreferences-backed implementations
  l10n/            # ARB files + generated AppLocalizations
  core/
    audio/         # SoundService (audioplayers) + Sfx
    settings/      # language, sound, last mode/robot (SettingsCubit)
    theme/         # colors, motion, spacing, theme
    widgets/       # ChunkyButton, ToySurface, AppBackground
  features/
    achievements/  # badges: rules, storage, badge widgets
    home/          # mode + robot selection
    onboarding/    # first-launch "how to play" slides
    game/          # match engine, AI, game UI, result page
    stats/         # lifetime statistics
assets/
  fonts/           # Baloo Bhaijaan 2 (OFL)
  images/hands/    # Noto Emoji hand artwork (Apache 2.0)
  sounds/          # generated sound effects

Each feature follows domain (entities, repository interfaces, use cases) → data (implementations) → presentation (Bloc, views, widgets).

Roadmap

  • Theme selection (system / light / dark)
  • Reset stats from the trophies page
  • Richer stats: favorite move, win rate per robot, current streak
  • First-launch "how to play" onboarding
  • Two-player pass-and-play mode
  • Achievements / badges
  • Crash reporting

License

MIT. Bundled assets keep their own licenses (see Credits).

Credits

  • Font: Baloo Bhaijaan 2, SIL Open Font License (assets/fonts/OFL.txt)
  • Hand artwork: Noto Emoji, Apache License 2.0 (assets/images/hands/LICENSE)

About

Kid-friendly Rock Paper Scissors game in Flutter with robot opponents, English/Persian (RTL) support, Bloc and clean architecture.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages