-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplayer.h
More file actions
53 lines (44 loc) · 1.27 KB
/
player.h
File metadata and controls
53 lines (44 loc) · 1.27 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
48
49
50
51
52
53
#ifndef PLAYER_H
#define PLAYER_H
#include <iostream>
#include <string>
#include "weapon.h"
using namespace std;
class Player
{
public:
Player();
Player(string name, int health, int power, int money, Weapon weapons[100], int level, int exp);
void setName(string name);
void setHealth(int health);
void setPower(int power);
void setMoney(int money);
void setWeapon(Weapon weapon);
void setWeaponSell(Weapon weapon, int index);
void setWeaponsCount(int num);
void decreaseWeaponsCount(int num);
void setPotion(int num);
void setLevel(int level);
void setExp(int exp);
string getName() const;
int getHealth() const;
int getPower() const;
int getMoney() const;
int getWeaponCount() const;
Weapon getWeapon(int index) const;
int getPotion() const;
int getLevel() const;
int getExp() const;
private:
string Name;
int Health;
int Power;
int Money;
int weaponsCount = 0;
static const int weaponSize = 100;
Weapon Weapons[weaponSize]; //limits the inventory size to 100
int Potion;
int Level;
int PlayerExp;
};
#endif