Fixes #22 — Skip irregular verbs in Full Table practice

randomFullTablePrompt now rejects any (verb, tense) combo where any
form has regularity != "regular" and keeps retrying (40 attempts) until
a fully-regular combo is picked. Full Table practice is meant for
drilling regular conjugation patterns — irregular tables belong in the
Irregularity Drills mode.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Trey t
2026-04-21 22:49:46 -05:00
parent 455df18dad
commit cdf1e05c4c

View File

@@ -89,6 +89,11 @@ struct PracticeSessionService {
let forms = referenceStore.fetchForms(verbId: verb.id, tenseId: tenseId) let forms = referenceStore.fetchForms(verbId: verb.id, tenseId: tenseId)
if forms.isEmpty { continue } if forms.isEmpty { continue }
// Full Table practice is for regular patterns only skip combos
// where any form in this (verb, tense) is irregular.
if forms.contains(where: { $0.regularity != "regular" }) { continue }
return FullTablePrompt(verb: verb, tenseInfo: tenseInfo, forms: forms) return FullTablePrompt(verb: verb, tenseInfo: tenseInfo, forms: forms)
} }