Add letter tracking to help users avoid repeating guessed letters (updated for domain services architecture) #18
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements a letter tracking feature that displays the alphabet with color-coded feedback to help users keep track of letters they've already guessed during the game. The implementation has been updated to work with the new domain services architecture from PR #20.
Features
Visual Letter Tracker: Displays A-Z alphabet above the game board with Bootstrap color coding:
Smart Status Tracking: Letters are tracked with intelligent priority system - status can only upgrade (Incorrect → IncorrectPosition → Correct), never downgrade, ensuring the best-known status is always displayed.
Implementation
Backend Changes
GuessedLettersdictionary to track letter statuses across all guessesGameSessionDtoto includeGuessedLettersasIReadOnlyDictionary<char, string>DtoMappingExtensionsto serialize letter statuses for API communicationFrontend Changes
Testing
Added comprehensive unit tests covering:
Example Usage
When a user guesses "HELLO" against target word "APPLE":
If they then guess "APPLE":
This significantly improves the game experience by providing visual feedback on letter usage, helping users make more strategic guesses and avoid repeating letters they know aren't in the word.
Compatibility
Fully compatible with the domain services refactoring, working seamlessly with the new GameSession/GuessResult models, domain service interfaces, and updated API structure.
Fixes #16.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.