< Previous | Contents | Next >

Welcoming the Player

Now its time to welcome the player, which is what I do next.

cout << "\t\t\tWelcome to Word Jumble!\n\n";

cout << "Unscramble the letters to make a word.\n"; cout << "Enter ’hint’ for a hint.\n";

cout << "Enter ’quit’ to quit the game.\n\n"; cout << "The jumble is: " << jumble;


string guess;

cout << "\n\nYour guess: "; cin >> guess;

I gave the player instructions on how to play, including how to quit and how to ask for a hint.


Hin t

image

As enthralling as you think your game is, you should always provide a way for the player to exit it.

image