Skip to content

fix: add ASCII hangman art for each wrong attempt#1597

Open
aaniya22 wants to merge 1 commit into
steam-bell-92:mainfrom
aaniya22:fix/hangman-ascii-art-aan22
Open

fix: add ASCII hangman art for each wrong attempt#1597
aaniya22 wants to merge 1 commit into
steam-bell-92:mainfrom
aaniya22:fix/hangman-ascii-art-aan22

Conversation

@aaniya22

Copy link
Copy Markdown
Contributor

📝 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 attempts counter — 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

  • I have verified that my files are placed in the correct directory.
  • I have tested my changes thoroughly on my local machine.
  • GSSoC 2026: I have been formally assigned to this issue and noted it above (assigned as aaniya22).

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.
@vercel

vercel Bot commented Jul 11, 2026

Copy link
Copy Markdown

@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.

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.

🐛 [Bug]: Hangman Game does not display ASCII art for the hangman figure`

1 participant