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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Hemant SrivastavaPosted Nov 27, 2012, 11:44 AM
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 SrivastavaPosted Nov 28, 2012, 2:44 PM
http://hemant-srivastava.blogspot.com/2012/11/hangman-game-guess-word-in-c.html
hussain kaleeemPosted Nov 28, 2012, 2:12 PM
Hemant SrivastavaPosted Nov 28, 2012, 10:14 AM
hussain kaleeemPosted Nov 28, 2012, 9:13 AM
hussain kaleeemPosted Nov 26, 2012, 11:37 PM
Hemant SrivastavaPosted Nov 26, 2012, 4:27 PM
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?