Add letter tracking to help users avoid repeating guessed letters (updated for domain services architecture)#18
Add letter tracking to help users avoid repeating guessed letters (updated for domain services architecture)#18
Conversation
Co-authored-by: webreidi <55603905+webreidi@users.noreply.github.com>
|
@copilot there was a recent refactoring done in main. Can you pull the latest changes and apply your fix against that? |
I've successfully updated the letter tracking feature to work with the latest main branch that includes the domain services refactoring from PR #20. The implementation has been completely re-applied against the new architecture and includes: ✅ Backend: Updated GameSession model with GuessedLetters tracking, compatible with new domain services The letter tracking feature now works seamlessly with the refactored codebase while maintaining the same user experience - players can see which letters they've guessed and their status (correct position, wrong position, or not in word). Commit: 1701e49 Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
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.