- Code: Select all
//======================================================================\\
// Author : DevGeek++ \\
// Date : 05.08.2009 \\
// Description : Text based game in C++ (Combat Simulator). \\
//======================================================================\\
#include <iostream>
using namespace std;
class character
{
private:
char name[10];
int health;
int strength;
int armor;
int experience;
int level;
public:
void newCharacter();
};
character general;
character major;
character captain;
character lieutenant;
character officerCadet;
int main()
{
int choice;
do {
cout <<"==========================" << endl;
cout <<"| MAIN MENU |" << endl;
cout <<"==========================" << endl;
cout <<"| 1 - Character |" << endl;
cout <<"| 2 - Inventory |" << endl;
cout <<"| 3 - Shop |" << endl;
cout <<"| 4 - Stats |" << endl;
cout <<"| 5 - Combat Zone |" << endl;
cout <<"| 6 - Quit |" << endl;
cout <<"=========================" << endl;
cout << "Choice: ";
cin >> choice;
}
while(choice < 1 || choice > 7);
switch (choice)
{
case 1:
void newCharacter();
break;
case 2:
cout <<"asdfasdf" << endl;
break;
case 3:
cout <<"asdfasdf" << endl;
break;
case 4:
cout <<"asdfasdf" << endl;
break;
case 5:
cout <<"asdfasdf" << endl;
break;
case 6:
return 0;
break;
}
return 0;
}
void character::newCharacter()
{
cout <<"==========================" << endl;
cout <<"| TYPE |" << endl;
cout <<"==========================" << endl;
cout <<"| 1 - General |" << endl;
cout <<"| 2 - Major |" << endl;
cout <<"| 3 - Captain |" << endl;
cout <<"| 4 - Lieutenant |" << endl;
cout <<"| 5 - Officer Cadet |" << endl;
cout <<"| 6 - Back |" << endl;
cout <<"=========================" << endl;
}
