Skip to content

v5.0.0 "Energetic Elderberry"

Choose a tag to compare

@z7workbench z7workbench released this 12 Apr 01:51
· 59 commits to main since this release

Summary

This release introduces a brand new Hearts card game, expands the theme system with a Forest color scheme, and delivers significant improvements to the 2048 game with save/load functionality. Version 5.0.0 marks a major milestone with 13 commits and 9,903 lines of new code.


🎮 New Features

Hearts Card Game

A complete implementation of the classic Hearts card game:

  • Full game rules: Pass phase, trick-taking, and scoring
  • AI system: Three difficulty levels (Easy/Medium/Hard)
    • Easy: Basic avoidance strategy
    • Medium: Strategic card play with opponent tracking
    • Hard: Advanced tactics including shoot moon detection
  • Card tracking: Tracks played cards for strategic decisions
  • Shoot the moon mechanic: Attempt to collect all 26 points
  • Pass direction cycle: Left → Right → Across → Hold (repeating)
  • UI features:
    • Wooden-themed card display
    • Pass phase with timer options (15s/30s/45s/Manual)
    • Received cards dialog after pass phase
    • Turn indicator and current trick display
    • Round/game over screens with detailed scores
  • i18n support: English and Chinese translations

Forest Color Scheme

Third color scheme option added to the theme system:

  • Light mode: Soft green, mint tones
  • Dark mode: Deep forest green, emerald shades
  • Integration: Complete theme system update (38 places)
  • Localization: "Forest" (EN) / "森林风格" (ZH)

2048 Save/Load System

Complete save management for the 2048 game:

  • Auto-save: Every 3 minutes during gameplay
  • Manual save slots: 3 slots with overwrite protection
  • Slot selection UI: Visual distinction for auto-save slot
  • Exit confirmation: Cancel / Exit without saving / Save & Exit
  • Back gesture handling: PopScope for proper navigation

Version Codename

Settings screen now displays version codename "Energetic Elderberry" with dynamic version reading via package_info_plus.


🐛 Bug Fixes

Android

  • Unified app name to "Mini Games" across launcher and recent tasks view

2048 Game

  • Grid responsive for landscape orientation with LayoutBuilder
  • Score cards and buttons sizing optimized for landscape
  • Instructions hidden in cramped landscape to prevent overflow

Data Layer

  • Prevented Twenty48Game provider auto-dispose losing loaded state
  • Prevented database auto-dispose causing channel closure errors
  • Added unique constraint to save slots for proper replacement
  • Schema migration to version 6 with duplicate cleanup

Yacht Dice

  • Show detailed scores for all players at game end

Guess Arrangement

  • Replaced hardcoded WoodenColors with context.theme* extensions
  • Card back pattern adapts to theme (white in Starlight)

📚 Documentation

README Updates

Both English and Chinese READMEs fully rewritten:

  • Complete documentation for all 7 games
  • Hearts game section with pass phase and shoot moon mechanics
  • Dice Battle marked as WIP with implemented features note
  • Hit & Blow database reference corrected (Hive → Drift)
  • New sections: Installation, Contributing, Project Structure, Screenshots
  • Theme system documentation with 3 color schemes
  • Full translation symmetry (576 lines each)

AGENTS.md Updates

  • Theme system guide expanded for Forest scheme
  • AI implementation guides for all games
  • Color scheme references updated throughout

🌍 Localization

New translation strings added:

Key English Chinese
forestScheme Forest 森林风格
t48_autoSave Auto-save 自动存档
t48_autoSaveInfo Automatically saved every 3 minutes 每3分钟自动保存
t48_overwriteConfirm Overwrite this save slot? 覆盖此存档位置?
t48_savedSuccessfully Game saved successfully! 游戏已成功保存!
Hearts UI strings 50+ keys 50+ keys

📊 Statistics

Metric Value
Commits 13
Files changed 60
Lines added 9,903
Lines removed 1,346

File Distribution

New files:

  • lib/games/hearts/ - 15 new files (complete game)
  • lib/ui/theme/forest_colors.dart - Forest theme definition
  • lib/data/tables/hearts_saves.dart - Hearts save table
  • lib/data/daos/hearts_saves_dao.dart - Hearts DAO

Modified files:

  • lib/ui/theme/app_theme.dart - Theme system expansion
  • lib/ui/theme/theme_colors.dart - Forest color integration
  • lib/games/twenty48/ - Save/load implementation
  • lib/l10n/ - New localization strings

Removed files:

  • arts/dices.webp, arts/hnb.webp, arts/hnb_leaderboard.webp - Outdated screenshots

🔄 Upgrade Notes

Database Migration

This release includes schema migration to version 6:

  • New hearts_saves table for Hearts game
  • Unique constraint on twenty48_saves.slot_index
  • Duplicate cleanup for existing save slots

Run database migration on first launch (automatic).

Theme System

Users can now select Forest color scheme in Settings. Existing theme preferences preserved.


🎯 Game List (v5.0.0)

Game Status AI Multiplayer
Hit & Blow ✅ Complete ✅ 3 levels ❌
Yacht Dice ✅ Complete ✅ 3 levels ❌
2048 ✅ Complete ❌ ❌
Guess Arrangement ✅ Complete ✅ 3 levels ❌
Hearts ✅ Complete ✅ 3 levels ❌
Dice Battle 🚧 WIP ✅ 3 levels ✅ Local
Gomoku 🚧 Planned TBD TBD

Commit History

5f9ae9c docs(readme): complete documentation for all 7 games
8a4b555 feat(ui): add version codename "Energetic Elderberry"
95c9a3c feat(theme): integrate Forest color scheme into theme system
57c0164 fix(android): unify app name to "Mini Games"
c6cfd8b fix(ui): make 2048 grid responsive for landscape
063ccb9 chore: update generated plugin registrant for macOS
1d55890 feat(game): add save/load UI with slot selection
1fb7c52 feat(i18n): add localization strings for 2048 save/load
13c8895 fix(game): prevent Twenty48Game provider auto-dispose
57d48af fix(data): prevent database auto-dispose errors
7af0fd4 fix(yacht_dice): show detailed scores for all players
34b6169 chore: bump version to 5.0.0
9a2c946 fix(ui): replace hardcoded colors in Guess Arrangement
caa7429 feat(game): add Hearts card game