twenty-questions: Show correct answer to user after user succeeded to answer#1116
twenty-questions: Show correct answer to user after user succeeded to answer#1116
Conversation
|
There was a problem hiding this comment.
Pull request overview
This PR enhances the user experience in the twenty-questions game by showing the correct answer to players after they finish, whether they succeed or fail. The implementation provides dual feedback: an ephemeral message in the chat and a display in the player modal.
Key Changes:
- Added topic display in the player modal when a player finishes the game
- Added ephemeral message showing the correct answer when a player successfully guesses
- Comprehensive test coverage for both success and failure scenarios
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| twenty-questions/views/playerModal.ts | Adds a section block to display the correct answer (topic) in the modal when the player has finished the game |
| twenty-questions/views/playerModal.test.ts | Adds three test cases covering different finish scenarios (correct answer, used all questions, and submit button validation) |
| twenty-questions/TwentyQuestions.ts | Adds an ephemeral message to show the correct answer immediately when a player successfully guesses the topic |
The implementation is solid with no issues found. The code follows existing patterns and style conventions, includes appropriate test coverage, and handles edge cases correctly. The use of full-width asterisks (*) for emphasis is consistent with the existing codebase style.



No description provided.