nudge with hangman

Hi I'm looking for a nudge in the right direction I'm trying out a hangman mechanism that will output


1
2
3
4
5
6
7
string obj0 = "\n --------";
string obj1 = "\n  |      |";
string obj2 = "\n  |      0";
string obj3 = "\n  |     /8\\ ";
string obj4 = "\n  |     / \\ ";
string obj5 = "\n  |";
string obj6 = "\n----\n";


in different stages
which is easy enough but need a way to output in stages when the user inputs a wrong guess and would like pointing in the right direction

I'm thinking for loop or do while ????????

please help

Cheers,

Bill.
Why not just go to a graphical programming environment? OpenGL/DirectX,WinAPI,Allegro, etc?

That way you could simply have the necessary images for head, feet, and the rest and just make them appear as needed =)
You could make a variable that counts the ammount of wrong guesses. For example, if int wrongGuesses == 0, display the first animation. If wrongGuesses == 1, display the second animation etc. Make an animation for each wrong guess (up till 6 or something). Increment wrongGuesses by one every time the player guesses a wrong letter.
Cheers I'm not going graphical because I'm learning C++ from scratch and want to completely understand the nuts and bolts. Plus I am currently making a text based RPG (which I am really enjoying!) to help all of the examples I' ve learnt from sink in, and to try and become competent with the subject matter. That's not to say I won't go graphical as I no doubt will just really want to get this down first.

Thanks for the input guys its appreciated!

Bill.
Topic archived. No new replies allowed.