cout << "This is the C++ text based game, not the actual game." << endl << endl;
cout << "Press any key to quit.";
break;
case 2:
cout << "Work in progress" << endl << endl;
cout << "Press any key to quit.";
break;
case 3:
cout << "You can't do anything" << endl << endl;
cout << "Press any key to quit.";
break;
case 4:
cout << "Beat the game first..." << endl << endl;
cout << "Press any key to quit.";
break;
case 5:
cout << "Haha, you figured out there is nothing to do!" << endl;
cout << "Press any key to quit.";
break;
default:
cout << "You're messing with me aren't you?"<< endl;
cout << "*sigh*...";
}
getch();
return 0;
}
I know that this isn't an actual game yet, my problem is, i'm not great with while and do while loops, could someone point me in the right direction?
#include <windows.h>
#include <iostream>
#include <conio.h>
#include <string.h>
usingnamespace std;
int main()
{
int difficulty;
int select;
int x;
int num;
do{
system("COLOR 1a");
cout << " [1]Play Bruiser: Bruiser Origins " << "\n";
cout << " [2]Story \n";
cout << " [3]Game Options " << endl;
cout << " [4]Extras " << endl;
cout << " [5]Quit the game" << endl << endl;
cout << " Press any number 1-5 and press enter." << "\t";
cin >> select;
switch(select)
{
case 1:
cout << "This is the C++ text based game, not the actual game." << endl << endl;
cout << "Press any key to quit.";
break;
case 2:
cout << "Work in progress" << endl << endl;
cout << "Press any key to quit.";
break;
case 3:
cout << "You can't do anything" << endl << endl;
cout << "Press any key to quit.";
break;
case 4:
cout << "Beat the game first..." << endl << endl;
cout << "Press any key to quit.";
break;
case 5:
cout << "Haha, you figured out there is nothing to do!" << endl;
cout << "Press any key to quit.";
break;
default:
cout << "You're messing with me aren't you?"<< endl;
cout << "*sigh*...";
cout<<"Input Number not equal to 1 - 5 :";
cin>>num;
}while( // This Loop Condition can Probably Be simplified but you get the idea
num>=0&&
num!=1||
num!=2||
num!!=3||
num!=4||
num!=5);
}
getch();
return 0;
}