Advertisement

I have a question on a map for a game.

Started by November 30, 2002 07:59 PM
10 comments, last by SSJCORY 21 years, 11 months ago
Hey guys cls is what i''m looking for but it didn''t work. Maybe the code is wrong, take a look.
#include
#include
int choice;
int x = 0;
int y = 0;
char map[5][5];
class character{
private:
int health;
int attackpower;
int defensepower;
int magicpower;
public:
setstats(int shealth, int sattackpower, int sdefensepower, int smagicpower){
health = shealth;
attackpower = sattackpower;
defensepower = sdefensepower;
magicpower = smagicpower;
}
int gethealth(){
return health;
}
int getattackpower(){
return attackpower;
}
int getdefensepower(){
return defensepower;
}
int getmagicpower(){
return magicpower;
}
};
main(){
character player;
cout<<"You have 3 options.\n";
cout<<"You can be a:\n";
cout<<"1 Paladin.\n";
cout<<"2 Magician.\n";
cout<<"3 Elf.\n";
cout<<"What would you like to be?";
cin>>choice;
if(choice==1){
player.setstats(50,25,15,20);
}
if(choice==2){
player.setstats(50,15,15,30);
}
if(choice==3){
player.setstats(50,30,20,15);
}
cout<<"\n\n\n";
cout<<"Health: "< cout<<"Attack Power: "< cout<<"Defense Power: "< cout<<"Magic Power: "< cout<<"\n\n\n";
cout<<"You start off in your room.\n";
system("cls");
cout<<"Welcome.\n";
return(0);
}

Favorite Quotes:Gandalf: You cannot pass!|Smeagol: We don't need you!|Sloth: Hey you guys!|
btw:

what about using the ["source"] command ... without the "" of course

[edited by - BB-Pest on December 1, 2002 7:39:22 AM]
---- sig coming soon

This topic is closed to new replies.

Advertisement