Skip to content

twenty-questions: Show correct answer to user after user succeeded to answer#1116

Open
hakatashi wants to merge 1 commit intomasterfrom
twenty-questions-show-answer-to-user
Open

twenty-questions: Show correct answer to user after user succeeded to answer#1116
hakatashi wants to merge 1 commit intomasterfrom
twenty-questions-show-answer-to-user

Conversation

@hakatashi
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings December 28, 2025 05:49
@sonarqubecloud
Copy link

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant