-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPokemon.h
73 lines (68 loc) · 1.35 KB
/
Pokemon.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/**
* @file : Pokemon.h
* @author : Ethan Ward
* @date : 2014.02.05
* Purpose: Creates Pokemon and changes their values when needed.
*/
#ifndef POKEMON_H
#define POKEMON_H
#include <string>
class Pokemon {
private:
int m_hp;
int m_attackLevel;
int m_defenseLevel;
std::string m_name;
public:
/**
* @pre None
* @post Creates and initializes a Pokemon instance with variables set to 0 and name set to an empty string
*/
Pokemon();
/**
* @pre None
* @post Reduces the Pokemon's hp by the given amount.
*/
void reduceHP(int amount);
/**
* @pre None
* @post Returns the HP of the Pokemon.
*/
int getHP() const;
/**
* @pre None
* @post Returns the attackLevel of the Pokemon.
*/
int getAttack() const;
/**
* @pre None
* @post Returns the defenseLevel of the Pokemon.
*/
int getDefense() const;
/**
* @pre None
* @post Returns the name of the Pokemon.
*/
std::string getName() const;
/**
* @pre None
* @post Sets the HP of the Pokemon to the given value.
*/
void setHP(int hp);
/**
* @pre None
* @post Sets the attackLevel of the Pokemon to the given value.
*/
void setAttack(int attack);
/**
* @pre None
* @post Sets the defenseLevel of the Pokemon to the given value.
*/
void setDefense(int defense);
/**
* @pre None
* @post Sets the name of the Pokemon to the given value.
*/
void setName(std::string name);
};
#endif