(db, cfg, profiles, present_categories)
| 1123 | finalize_game("High Stakes (mode)", difficulty, profiles, hs, players, scores, {"category": cat, "questions": total}, save=True) |
| 1124 | |
| 1125 | def mode_practice(db, cfg, profiles, present_categories): |
| 1126 | difficulty = choose_difficulty() |
| 1127 | clear() |
| 1128 | print("=== PRACTICE (not saved) ===\n") |
| 1129 | cat = choose_category_menu(present_categories) |
| 1130 | pool = build_pool(db, cat, difficulty) |
| 1131 | rng = random.Random() |
| 1132 | while True: |
| 1133 | clear() |
| 1134 | print(f"Practice | Category: {cat} | Diff: {difficulty}\n") |
| 1135 | ok, took, to, ans = ask_question(rng.choice(pool), 0) |
| 1136 | if ok: |
| 1137 | print("\n✅ Correct!") |
| 1138 | else: |
| 1139 | print("\n❌ Wrong.") |
| 1140 | print("Answer:", ans) |
| 1141 | c = input("\nENTER=next | q=quit : ").strip().lower() |
| 1142 | if c == "q": |
| 1143 | return |
| 1144 | |
| 1145 | # -------------------- Settings menu -------------------- |
| 1146 | def load_settings() -> dict: |
no test coverage detected