Battlearene 3. kodutöö
return hitpoints;
}
string Character::getWeaponName(){
return weapons->getName();
}
void Character::printDescription(){
toString();
cout<<"HP: "<chosenName){
weapons=new sword();
hitpoints=100;
type=0;
typeName="warrior";
//kontrollime nime unikaalsust
int i;
bool exist=0;
while(true){
for(i=0; ichosenName){
exist=1;
}
}
if(exist==1){
exist=0;
cout<<"Selline nimi eksisteerib, palun proovige uuesti!"<>chosenName;
}
else{
namesV.push_back(chosenName);
break;
}
}
name=chosenName;