Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
/*Basic code on Pocket Monsters class by Poojith Patnala. */
class Pocket_Monsters {
char* type;
char* weakness;
int level;
int xp;
float baseStats[3]; //attack health and defence //array is kind of a pointer
float actualStats[3]; //a formula calculating actualstats by multiplying base stats by levels
float bonuses[3]; // extra bonuses for the attack, health and defence, from bonuses like potions.
int numberOfBattles; // number
bool isDowned; //pokemon is down until it wont be down anymore
public:
Pocket_Monsters() {
type = NULL; // NUll means nothing, null pointer// best practice for using NULL
weakness = NULL;
level = NULL;
xp = NULL;
baseStats[]=nullptr; //Null pointer means nothing for pointer instead normal variable
actualStats[]=nullptr;
bonuses[]=nullptr; //
numberOfBattles = NULL;
isDowned = false;
}
void isXpEnoughForLvlUp() {
}