C ++ hangman - help with one thing?
i have made the program with a human vs computer, but i have to make it against human vs human - how do i go about this oh hers the code for the human and computer---- This looks like Rock Paper Scissors?
In order to make it human v human, you will need to duplicate the code (renaming functions and variables obviously). For the first player, it should save his choice and not display it, and for the second player, it should show his choice and the first players, ie: void display_the_choice (char choice) { char c = tolower(choice); string result; if (c == 'r') result = "Player 1 Chose Rock"; else if (c == 'p') result = "Player 1 Chose Paper"; else if (c == 's') result = "Player 1 Chose Scissors"; } And then, when player 2 makes a choice, then void display_the_choice_p2 (char choice) { char c = tolower(choice); if (c == 'r') cout << result << "Player 2 Chose Rock"<<endl; else if (c == 'p') cout << result << endl << "Player 1 Chose Paper"<<endl; else if (c == 's') cout<< endl << result << "Player 1 Chose Scissors"<<endl; } Any more problems post back! Try posting this question at www.dreamincode.net. They're very helpful and quick!
Your comments suck lol
i think this is not hangman...
What are easy games like Tic-tac-toe and hangman? (I just need like 5 games, cards, pencil and paper)?OK.The question is simple ^^ So the more games (that young kids can play, and it's easy to explain) you How many letter guesses does a person get in a game of hangman?In the lord of the flies what does it mean "the hangman's horror clung around Roger"?If u can help me in diz question i would gladly appreciate it.thx =) Hangman word i cant figure out! HELP?The word isEdge_a_s the avaliable letters are : F H J K P Q U W X Y Z So out of those letters could What is the answer to Qweb set 2 level 4 the one w/ hangman?What are some good words for Hangman?Hey, I was wondering, what are some good words for Hangman, because whenever I PLAY it and I HAVE TO think of the word, all¿gta4 leaderboard Hangman's NOOSE who's your favorite NOOSER?I see there are so many people still trying to get a good spot on it,,,and i was wondering if you know about it and if you |
Funny Laughter Pixar Cars |