05/23 Phase 15
This commit is contained in:
@@ -341,6 +341,20 @@ All actions are logged to console and optionally to a log file:
|
||||
|
||||
---
|
||||
|
||||
### ✅ Phase 15 — Odds Calculator
|
||||
- [x] Write `core/odds.py`
|
||||
- [x] `total_combinations(main_count, main_max, bonus_count, bonus_max) -> int`
|
||||
- [x] `prize_odds(main_count, main_max, bonus_count, bonus_max) -> list[dict]` — generates all prize tiers dynamically, sorted hardest-first by odds
|
||||
- [x] `game_odds(game_id) -> list[dict]` — DB-backed convenience wrapper
|
||||
- [x] Handles 0-bonus and 1-bonus games; bonus_count ≥ 2 returns jackpot only
|
||||
- [x] Verified against known Powerball (1 in 292,201,338) and Mega Millions (1 in 302,575,350) jackpot odds
|
||||
- [x] Add "Odds" tab to `ui/analysis.py` (8th tab, ttk.Treeview — no matplotlib)
|
||||
- [x] Columns: Prize Tier | Odds (1 in X) | Probability
|
||||
- [x] Refreshes when game dropdown changes
|
||||
- [x] Write `tests/test_odds.py` — 22 tests (296/296 total passing)
|
||||
|
||||
---
|
||||
|
||||
### ✅ Phase 14 — Custom Game Management
|
||||
- [x] Add `_BUILTIN_GAMES = {"Powerball", "Mega Millions"}` constant to `db/models.py`
|
||||
- [x] Add `add_game(name, main_count, main_max, bonus_count, bonus_max) -> int`
|
||||
|
||||
Reference in New Issue
Block a user