Code:
//Remembers:
#include <iostream.h>
#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
//#include <Strings.h>
#define WEP_Knife 1
#define WEP_Pulse Rifle 2
#define WEP_Shotgun 3
#define WEP_Smartgun 4
#define WEP_Sniper Rifle 5
#define WEP_Rocket Launcher 6
#define WEP_Mini Gun 7
#define WEP_Dual Pistols 8
#define WEP_Pistols 9
class Monster
{
public:
Monster(int,int);
Monster(){};
~Monster(){};
int hp;
int attack;
};
Monster::Monster(int HP,int ATTACK)
{
hp=HP;
attack=ATTACK;
}
class Character
{
public:
Character(int,int,int);
Character(){};
~Character(){};
int hp;
int attack;
int inventory;
int exp;
};
Character::Character(int HP,int ATTACK,int INV)
{
hp=HP;
attack=ATTACK;
inventory=INV;
}
void TextPrint(char Sentence[],int sleep);
void DrawMenu(); // function prototype
int RandDice(int,int);
void Credits();
int RandMonster(int,int,int,int,int,int,int,int,int);
int main()
{
srand(GetTickCount());
char Name[100];
int MenuChoice;
int ClassChoice;
//Character player;
//Character.hp=100;
//Character.attack=RandDice(30,100);
//Character.inventory=(1,2,3,4);
Monster Predator(10,RandDice(30,50));
Monster HeavyPredator(10,RandDice(30,50));
Monster AssualtPredator(10,RandDice(30,50));
Monster LightPredator(10,RandDice(30,50));
Monster LuciferPredator(10,RandDice(30,50));
Monster Drone(20,RandDice(20,30));
Monster Predalien(20,RandDice(20,30));
Monster Runner(20,RandDice(20,30));
Monster Pretorion(20,RandDice(20,30));
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),8);
while(1)
{
DrawMenu();
cin >> MenuChoice;
switch(MenuChoice)
{
case 1:
cout << "you chose start game! \n";
break;
case 2:
cout << "you chose load game! \n";
break;
case 3:
Credits();
break;
default:
cout << "That wasn't one of the choices \n";
continue;
}
break;
}
clrscr();
cout << "Please enter your character's name \n";
cin >> Name;
clrscr();
cout << "Welcome to G-Unit Sector "<<Name<<"\n";
cout << "please choose a character class \n";
cout << "\t\t *********Character classes******** \n";
cout << "\t\t * * \n";
cout << "\t\t * 1.Marine * \n";
cout << "\t\t * 2.Corporate * \n";
cout << "\t\t * * \n";
cout << "\t\t * * \n";
cout << "\t\t ********************************** \n";
cin >> ClassChoice;
switch(ClassChoice)
{
case 1:
cout << "you chose to be a Marine \n";
break;
case 2:
cout << "you chose to be a corporate \n";
break;
}
clrscr();
TextPrint("insert text here",40);
getch();
clrscr();
cout << "insert text here"
<<Name<<"insert text here\n";
cout << "insert text here "<<Name<<"insert text here\n";
getch();
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED); cout <<"insert text here\n";
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),8);
TextPrint("insert text here",40);
getch();
clrscr();
cout << "insert text here\n";
cin >> Name;
cout << "insert text here\n";
cout << "insert text here\n";
cout << "y/n\n"
cin >> name;
// would the if statment go here
getch();
return 0;
}
void DrawMenu() // function definition
{
cout << "\t\t ************Start Menu************* \n";
cout << "\t\t * * \n";
cout << "\t\t * 1.start game * \n";
cout << "\t\t * 2.load game * \n";
cout << "\t\t * 3.credits * \n";
cout << "\t\t * * \n";
cout << "\t\t *********************************** \n";
}
int RandDice(int low, int high)
{
return (rand() % (low - high + 1) + low);
}
void Credits()
{
clrscr();
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_BLUE); TextPrint("This game was brought to by Joe M. \n\
Programmed by: Inferno \n\
Inspired By: Stan100 and [GU]Lord Soth{CM} \n\
sepcial thanks: Stan100 \n\
Copyrighted @ 2003 by Inferno corp.",40);
getch();
exit(0);
}
void TextPrint(char Sentence[],int sleep)
{
for(int a=0;a<strlen(Sentence); a++)
{
cout << Sentence[a];
Sleep(sleep);
}
}