3.7.4 欢迎界面
现在该欢迎玩家了,做法如下:
- 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;
这段程序告诉玩家游戏的操作指南,包括如何退出和如何请求提示。
提示
无论游戏多么吸引人,还是应当给玩家提供退出游戏的方式。