Commit Graph

4 Commits

Author SHA1 Message Date
Alexander Doerflinger
689bf2808a Added a Player stats view to the GameResult
Currently only showing the stats of the winning player and also only the overall stats, has to be improved to show stats of all players and also only the stats of the match, not the overall one.
2026-02-02 14:54:06 +01:00
Alexander Doerflinger
3fc5966e40 Added Animation and Sound for Game End 2026-01-30 10:29:43 +01:00
Alexander Doerflinger
c2f18d9328 feat: implement comprehensive statistics tracking and refactor checkout engine
BREAKING CHANGE: Database schema updated from v3 to v9 (destructive migration)

Major Features:
- Statistics system: Track player performance (darts, points, matches, double-outs)
- Match state management: ONGOING/COMPLETED/CANCELED with state-based queries
- Settings activity: Day/night mode and standard game mode preferences
- CheckoutEngine refactored to standalone utility class with 1/2/3-dart methods

CheckoutConstants Overhaul:
- Generate all possible double-out combinations (~37,200 routes)
- Intelligent route selection (fewer darts > T20/T19 > higher doubles)
- Store both optimal routes and complete alternatives

GameActivity Enhancements:
- Automatic statistics tracking on turn submission and win
- Career average calculation and database updates
- Fixed race condition with dart value capture

Database Changes:
- Added Statistics entity and StatisticsDao
- Player ID migration: int → long for consistency
- Match entity: added MatchState enum and helper methods
- MatchDao: new state-based query methods

Developer Experience:
- Comprehensive JavaDoc across all new/modified classes
- Test harness for checkout generation validation
- Improved code organization with utils package separation
2026-01-30 08:21:26 +01:00
Alexander Doerflinger
a4a42fc73f Initial Commit 2026-01-28 12:33:38 +01:00