Rock, paper,scissors C++

Hello, I was wondering if I could get an answer to the rock, paper, scissor project. There’s this part of the code that populates the rock, paper, scissor emoji. How do I enter a different emoji into the output like this? I would like to better understand the process. If anyone could explain it to me, I would greatly appreciate it

std::cout << “1) :fist:\n”;
std::cout << “2) :raised_hand:\n”;
std::cout << “3) :v:\n”;
Thank you for your time.

Emoji’s are characters, so you’d enter them the same way as letters or numbers, wouldn’t you?

3 Likes

Would like some feed back of the solution to the C++ rock paper scissors project. The logic looks for a tie then looks for a user win, else everything after that is a computer win.

#include <stdlib.h>
#include

/*Rock, Paper, Scissors is a game of chance between two competitors and is scored either as a win for one competitor or a draw for each competitor. The hierarchy of the game is based on the dominance of paper covers rock, rock breaks scissors, scissors cut paper. */

int main() {
int computer = rand() % 3 + 1;
int user = 0;

system(“clear”);

std::cout << “====================\n”;
std::cout << “rock paper scissors!\n”;
std::cout << “====================\n”;

std::cout << “1) Rock\n”;
std::cout << “2) Paper\n”;
std::cout << “3) Scissors\n\n”;

std::cout << "Shoot! ";
std::cin >> user;

std::cout << "\n\nComputer: " << computer << “\n”;
std::cout << "Human: " << user << “\n\n”;

//Decide the winner
if (user == computer) {
std::cout << “It was a tie\n\n”;
}
else if ((user == 1 && computer) == 3 || (user ==2 && computer == 1) || (user == 3 && computer == 2)){
std::cout << “Human WIns!!!\n\n”;
}
else {
std::cout << “Computer Wins!!!\n\n”;
}

return 0;
}