-
Notifications
You must be signed in to change notification settings - Fork 0
/
Weapon.h
43 lines (32 loc) · 1.02 KB
/
Weapon.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
#ifndef _Weapon_
#define _Weapon_
#include "string"
#include "REEnums.h"
class Weapon : public Item {
public:
Weapon(std::string na, REEnums::WeaponType ty, unsigned da, unsigned du,
unsigned we, unsigned ac, REEnums::WeaponType fo,
REEnums::WeaponType ft, REEnums::WeaponType uo,
REEnums::WeaponType ut);
// accessors
unsigned getDamage() const;
unsigned getWeight() const;
unsigned getAccuracy() const;
REEnums::WeaponType getType() const;
bool isFavored(const REEnums::WeaponType type);
bool isUnfavored(const REEnums::WeaponType type);
// mutators
void setDamage(const unsigned newDa);
void setWeight(const unsigned newWe);
void setAccuracy(const unsigned newAc);
private:
unsigned damage;
unsigned weight;
unsigned accuracy;
REEnums::WeaponType type;
REEnums::WeaponType favoredOne;
REEnums::WeaponType favoredTwo;
REEnums::WeaponType unfavoredOne;
REEnums::WeaponType unfavoredTwo;
};
#endif