Joining the Dots

Learn to set up the main function using all functions.

What we have

We have catered to all the components of the game. We’ve created all the game’s functionalities, but have we sorted our game yet? This is our inventory of already created functions:

// Function to display game introduction and rules
void displayIntroductionAndRules() {
    cout << "Welcome to Rock-Paper-Scissors game!\n" << endl;
    cout << "The rules of the game are simple:" << endl;
    cout << "1. Rock beats scissors" << endl;
    cout << "2. Scissors beats paper" << endl;
    cout << "3. Paper beats rock" << endl;
}

// Function to get number of rounds
int getRound() {
    int rounds;
    cout << "How many rounds would you like to play? ";
    cin >>
...