fix: add ASCII hangman art for each wrong attempt#1597
Open
aaniya22 wants to merge 1 commit into
Open
Conversation
Adds HANGMAN_STAGES, a list of 7 ASCII art frames (0-6 wrong guesses), printed alongside the word progress each turn. Previously only text messages indicated wrong guesses, with no visual representation of the hangman figure. Closes steam-bell-92#1426.
|
@aaniya22 is attempting to deploy a commit to the Anuj's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
📝 Description
The Hangman game tracked wrong attempts correctly but never rendered the traditional ASCII hangman figure — only text like "✗ Wrong! 'x' is not in the word." was shown, defeating a core part of the game's visual feedback.
Added HANGMAN_STAGES, a list of 7 ASCII art frames (0-6 wrong guesses), printed alongside the word progress each turn. The current stage is indexed by the existing
attemptscounter — no changes to game logic, win/loss conditions, or existing variables were needed.Tested manually by playing through a full game: confirmed all 7 stages render correctly and progress only on wrong guesses (correct guesses and duplicate-letter warnings don't advance the figure), and confirmed the win condition still triggers the victory banner correctly.
🔗 Linked Issue
Closes #1426
📋 Contribution Checklist