Commit a5509e7
Fix homophone collision in answer matching
Problem: When limitedMatches contained duplicate words (same kanji,
same reading appearing multiple times), the progress counter would
jump by 2+ when finding one word. For example, typing "いる" once
would match both duplicate entries, making the count go from 0/10
to 2/10.
Solution: Deduplicate matches by word before using them for the game.
Keep first occurrence and log warning when duplicates are removed.
This fixes the issue where games would reach 10/10 after only
entering 5 unique answers.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent c3c2c9a commit a5509e7
1 file changed
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
120 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
121 | 132 | | |
122 | 133 | | |
123 | 134 | | |
| |||
0 commit comments