maddie_dlt

pokeType.h

Nov 22nd, 2016
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.52 KB | None | 0 0
  1.  
  2. #include <string>
  3. #include <iostream>
  4.  
  5. using namespace std;
  6.  
  7. #ifndef POKETYPE_H
  8. #define POKETYPE_H
  9.  
  10. struct Pokemon
  11. {
  12. private:
  13. string name; //Pokemon Name
  14. string type; //Pokemon Type
  15. int rarity; //Pokemon Rarity
  16. int candies; //candies user will accumulate from catch
  17. int healthPoints; //total points until the Pokemon faints
  18. int attackPoints; //points Pokemon takes from Attacker per hit
  19. int defensePoints; //Points Attacker takes from Pokemon per hit
  20.  
  21. public:
  22. /*
  23. *description: this function sets the name
  24. *return: void
  25. *precondition: a string must exist
  26. *postcondition: the value of the string is unchanged
  27. * the variable name is initialized
  28. */
  29. void setName(string);
  30.  
  31. /*
  32. *description: this function returns the name
  33. *return: string
  34. *precondition: a string name must exist
  35. *postcondition: the value of the string is unchanged
  36. * the variable name is returned
  37. */
  38. string getName();
  39.  
  40. /*
  41. *description: this function sets the Pokemon type
  42. *return: void
  43. *precondition: a string must exist
  44. *postcondition: the value of the string is unchanged
  45. * the variable type is initialized
  46. */
  47. void setType(string);
  48.  
  49. /*
  50. *description: this function returns the Pokemon's type
  51. *return: string
  52. *precondition: a string type must exist
  53. *postcondition: the value of the string is unchanged
  54. * the variable type is returned
  55. */
  56. string getType();
  57.  
  58. /*
  59. *description: this function sets the Pokemon rarity
  60. *return: void
  61. *precondition: a string must exist
  62. *postcondition: the value of the string is unchanged
  63. * the variable type is initialized
  64. */
  65. void setRarity(int);
  66.  
  67. /*
  68. *description: this function returns the Pokemon rarity
  69. *return: int
  70. *precondition: an integer rarity must exist
  71. *postcondition: the value of the string is unchanged
  72. * the variable rarity is returned
  73. */
  74. int getRarity();
  75.  
  76. /*
  77. *description: this function sets the number of candies
  78. *return: void
  79. *precondition: a string must exist
  80. *postcondition: the value of the string is unchanged
  81. * the variable candies is initialized
  82. */
  83. void setCandies(int);
  84.  
  85. /*
  86. *description: this function returns the number of candies
  87. *return: int
  88. *precondition: an integer rarity must exist
  89. *postcondition: the value of the string is unchanged
  90. * the variable candies is returned
  91. */
  92. int getCandies();
  93.  
  94. /*
  95. *description: this function sets the number of Health Points
  96. *return: void
  97. *precondition: a integer must exist
  98. *postcondition: the value of the string is unchanged
  99. * the variable healthPoints is initialized
  100. */
  101. void setHealthPoints(int);
  102.  
  103. /*
  104. *description: this function returns the number of candies
  105. *return: int
  106. *precondition: an integer healthPoints must exist
  107. *postcondition: the value of the int is unchanged
  108. * the variable healthPoints is returned
  109. */
  110. int getHealthPoints();
  111.  
  112. /*
  113. *description: this function sets the number of Attack Points
  114. *return: void
  115. *precondition: a integer must exist
  116. *postcondition: the value of the int is unchanged
  117. * the variable attackPoints is initialized
  118. */
  119. void setAttackPoints(int);
  120.  
  121. /*
  122. *description: this function returns the number of Attack Points
  123. *return: int
  124. *precondition: an integer attackPoints must exist
  125. *postcondition: the value of the int is unchanged
  126. * the variable attackPoints is returned
  127. */
  128. int getAttackPoints();
  129.  
  130. /*
  131. *description: this function sets the number of Defense Points
  132. *return: void
  133. *precondition: a integer must exist
  134. *postcondition: the value of the int is unchanged
  135. * the variable defensePoints is initialized
  136. */
  137. void setDefensePoints(int);
  138.  
  139. /*
  140. *description: this function returns the number of Defense Points
  141. *return: int
  142. *precondition: an integer defensePoints must exist
  143. *postcondition: the value of the int is unchanged
  144. * the variable defensePoints is returned
  145. */
  146. int getDefensePoints();
  147.  
  148. };
  149.  
  150. /*
  151. *description: This function calculates a seed for a random number generator.
  152. *return: int
  153. *precondition: integers for the red, green, and blue values must exist
  154. *postcondition: the three integers are unchanged and an int is returned
  155. *
  156. */
  157. int calcSeed(int, int, int);
  158.  
  159. /*
  160. *description: this function returns whether or not a pokemon
  161. is appears after each move
  162. *return: bool
  163. *precondition: an integer for the array element must exist
  164. red, green, and blue values must exist
  165. *postcondition: the value of red, green, and blue are unchanged
  166. * the string is changed
  167. */
  168. bool isFound(string&, int, int, int);
  169.  
  170. /*
  171. *description: this function determines which pokemon will appear by
  172. * generating an integer that will later by used as the
  173. * element number of one of the pokemon arrays.
  174. *return: int
  175. *precondition: an integer for the array element must exist
  176. red, green, and blue values must exist
  177. *postcondition: the value of red, green, and blue are unchanged
  178. *
  179. */
  180. int getPokeNum(int, int, int);
  181.  
  182. #endif // POKETYPE_H
Add Comment
Please, Sign In to add comment