-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEquipable.cpp
More file actions
47 lines (41 loc) · 1.41 KB
/
Equipable.cpp
File metadata and controls
47 lines (41 loc) · 1.41 KB
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
#ifndef EQUIPABLE_C
#define EQUIPABLE_C
#include <iostream>
class Equipable {
private:
int DMG, durability, value, Def;
std::string name, type, rarity, slot, description;
public:
Equipable(std::string name, std::string type, int DMG, int durability, int value, std::string rarity, std::string slot, std::string description, int Def) {
this->name = name;
this->type = type;
this->DMG = DMG;
this->durability = durability;
this->value = value;
this->rarity = rarity;
this->slot = slot;
this->description = description;
this->Def = Def;
}
void viewDetails() const {
std::cout << "Name: " << name << std::endl;
std::cout << "Type: " << type << std::endl;
std::cout << "DMG: " << DMG << std::endl;
std::cout << "Durability: " << durability << std::endl;
std::cout << "Value: " << value << std::endl;
std::cout << "Rarity: " << rarity << std::endl;
std::cout << "Slot: " << slot << std::endl;
std::cout << "Description: " << description << std::endl;
std::cout << "Def: " << Def << std::endl;
}
std::string getName() { return name; }
std::string getType() { return type; }
int getDMG() const { return DMG; }
int getDurability() const { return durability; }
int getValue() const { return value; }
std::string getRarity() { return rarity; }
std::string getSlot() { return slot; }
std::string getDescription() { return description; }
int getDef() const { return Def; }
};
#endif // !EQUIPABLE_C