Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <string>
- #include <iostream>
- using namespace std;
- #ifndef POKETYPE_H
- #define POKETYPE_H
- struct Pokemon
- {
- private:
- string name; //Pokemon Name
- string type; //Pokemon Type
- int rarity; //Pokemon Rarity
- int candies; //candies user will accumulate from catch
- int healthPoints; //total points until the Pokemon faints
- int attackPoints; //points Pokemon takes from Attacker per hit
- int defensePoints; //Points Attacker takes from Pokemon per hit
- public:
- /*
- *description: this function sets the name
- *return: void
- *precondition: a string must exist
- *postcondition: the value of the string is unchanged
- * the variable name is initialized
- */
- void setName(string);
- /*
- *description: this function returns the name
- *return: string
- *precondition: a string name must exist
- *postcondition: the value of the string is unchanged
- * the variable name is returned
- */
- string getName();
- /*
- *description: this function sets the Pokemon type
- *return: void
- *precondition: a string must exist
- *postcondition: the value of the string is unchanged
- * the variable type is initialized
- */
- void setType(string);
- /*
- *description: this function returns the Pokemon's type
- *return: string
- *precondition: a string type must exist
- *postcondition: the value of the string is unchanged
- * the variable type is returned
- */
- string getType();
- /*
- *description: this function sets the Pokemon rarity
- *return: void
- *precondition: a string must exist
- *postcondition: the value of the string is unchanged
- * the variable type is initialized
- */
- void setRarity(int);
- /*
- *description: this function returns the Pokemon rarity
- *return: int
- *precondition: an integer rarity must exist
- *postcondition: the value of the string is unchanged
- * the variable rarity is returned
- */
- int getRarity();
- /*
- *description: this function sets the number of candies
- *return: void
- *precondition: a string must exist
- *postcondition: the value of the string is unchanged
- * the variable candies is initialized
- */
- void setCandies(int);
- /*
- *description: this function returns the number of candies
- *return: int
- *precondition: an integer rarity must exist
- *postcondition: the value of the string is unchanged
- * the variable candies is returned
- */
- int getCandies();
- /*
- *description: this function sets the number of Health Points
- *return: void
- *precondition: a integer must exist
- *postcondition: the value of the string is unchanged
- * the variable healthPoints is initialized
- */
- void setHealthPoints(int);
- /*
- *description: this function returns the number of candies
- *return: int
- *precondition: an integer healthPoints must exist
- *postcondition: the value of the int is unchanged
- * the variable healthPoints is returned
- */
- int getHealthPoints();
- /*
- *description: this function sets the number of Attack Points
- *return: void
- *precondition: a integer must exist
- *postcondition: the value of the int is unchanged
- * the variable attackPoints is initialized
- */
- void setAttackPoints(int);
- /*
- *description: this function returns the number of Attack Points
- *return: int
- *precondition: an integer attackPoints must exist
- *postcondition: the value of the int is unchanged
- * the variable attackPoints is returned
- */
- int getAttackPoints();
- /*
- *description: this function sets the number of Defense Points
- *return: void
- *precondition: a integer must exist
- *postcondition: the value of the int is unchanged
- * the variable defensePoints is initialized
- */
- void setDefensePoints(int);
- /*
- *description: this function returns the number of Defense Points
- *return: int
- *precondition: an integer defensePoints must exist
- *postcondition: the value of the int is unchanged
- * the variable defensePoints is returned
- */
- int getDefensePoints();
- };
- /*
- *description: This function calculates a seed for a random number generator.
- *return: int
- *precondition: integers for the red, green, and blue values must exist
- *postcondition: the three integers are unchanged and an int is returned
- *
- */
- int calcSeed(int, int, int);
- /*
- *description: this function returns whether or not a pokemon
- is appears after each move
- *return: bool
- *precondition: an integer for the array element must exist
- red, green, and blue values must exist
- *postcondition: the value of red, green, and blue are unchanged
- * the string is changed
- */
- bool isFound(string&, int, int, int);
- /*
- *description: this function determines which pokemon will appear by
- * generating an integer that will later by used as the
- * element number of one of the pokemon arrays.
- *return: int
- *precondition: an integer for the array element must exist
- red, green, and blue values must exist
- *postcondition: the value of red, green, and blue are unchanged
- *
- */
- int getPokeNum(int, int, int);
- #endif // POKETYPE_H
Add Comment
Please, Sign In to add comment