i need to develop hangman on following idea
one string array which generate a random words (show on label) and one textbox whic takes a input from user and our program check input letter according to randomize word
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Hemant SrivastavaRank #581 · 4.2K reputationPosted Nov 27, 2012, 6:44 AM EST
1. You take the random word from your string array.
2. Add 26 buttons for taking input letters (A,B,C.. etc)
3. When any input button is pressed, store that letter into a "temp" string.
4. Convert the "Word to find" string into character array.
5. Make another string "stringToDisplay" which you have to display on GUI for intermediate status
(For example: If Word is "APPLE" then at some point of time, your stringToDisplay could be as "A_PL_" )
6. Check each letter in the "WordToFind" character array whether any letter is matched with input letter.
7. Wherever we find any match, we keep appending that letter into "stringToDisplay".
8. wherever we don't find match, we append "_" into stringToDisplay. In addition to this, whenever computer finds a wrong attempt (guess) by a player, Computer draws a small portion of the HANGMAN
9. Display every time "stringToDisplay" on a label on the GUI for the player to view his current progress.
10. Let the player keep guessing until computer completes its HANGMAN drawing or player guesses all the letters in the word correctly.
Hope the above logic works for you.
Please mark it accepted answer if you find this suggestion is good for you.
A similar type of Word guessing game I made it earlier that is posted on my blog:
http://hemant-srivastava.blogspot.com/2012/11/hangman-game-guess-word-in-c.html
Thanks
Hemant
Hemant SrivastavaRank #581 · 4.2K reputationPosted Nov 26, 2012, 11:27 AM EST
Do you want to create this game as aWindows Application OR Web Application?
The word which player has to guess should be hard coded OR coming from any dictionary through some web services?
hussain kaleeemRank #6,320 · 270 reputationPosted Nov 26, 2012, 6:37 PM EST
hussain kaleeemRank #6,320 · 270 reputationPosted Nov 28, 2012, 4:13 AM EST
Hemant SrivastavaRank #581 · 4.2K reputationPosted Nov 28, 2012, 5:14 AM EST
hussain kaleeemRank #6,320 · 270 reputationPosted Nov 28, 2012, 9:12 AM EST
Hemant SrivastavaRank #581 · 4.2K reputationPosted Nov 28, 2012, 9:44 AM EST
http://hemant-srivastava.blogspot.com/2012/11/hangman-game-guess-word-in-c.html