I have my project due of hangman and it is worrying me lately. I need to make a hangman game.
I have studied arrays, functions, loops, if else statements. That is about it. I haven't done 2d arrays. Will do it now, because someone told me it is not possible to make a hangman game of 40 words without 2d arrays.
My question to you is.
*how to store words for hangman? Say I saved them in arrays. But then how do i retrieve them?
*How to I randomly generate words for hangman?
*I know how to randomly generate numbers, but how to associate that random number with another word?
*How to compare that word with the user entered letters?
Some info regarding my game.
*I made seven categories. The user chooses one category. Every category has similar words but not having the same size. E.g I have a category for places. So the words may be like London, Zurich, Paris etc.
*Every category has no more than 7 words. Now how to randomly generate them?
*Also, it is bad to have different sized words in one simple category? I mean does it make the program more complex?
I really would appreciate your help. I have spent alot of hours figuring out things but i have failed.
Thank you for your time and cooperation.