The service now tracks the correct optionId for each question and stores the answer key in the GameSessionStore after building the session. The client response is unchanged — the store is invisible to the outside. - Build answerKey (questionId → correctOptionId) during question assembly by finding the correct answer's position after shuffle - Store the answer key via gameSessionStore.create() before returning - Add excludeText parameter to getDistractors to prevent a distractor from having identical text to the correct answer (different term, same translation). Solved at the query level, not with post-filtering. - Module-level InMemoryGameSessionStore singleton in the service |
||
|---|---|---|
| .. | ||
| src | ||
| Dockerfile | ||
| package.json | ||
| tsconfig.json | ||
| vitest.config.ts | ||