blob: 8fa1829b1d2b17a0de2de969f09cf6822a26718c (
plain)
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
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Character.hpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/04/14 13:42:25 by charles #+# #+# */
/* Updated: 2020/11/17 09:06:25 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef CHARACTER_HPP
# define CHARACTER_HPP
# include <iostream>
# include <string>
# include "AWeapon.hpp"
# include "Enemy.hpp"
class Character
{
public:
Character(Character const& other);
Character& operator=(Character const& other);
~Character();
Character(std::string const& name);
void recoverAP();
void equip(AWeapon *weapon);
void attack(Enemy *enemy);
std::string const& getName() const;
int getAP() const;
AWeapon* getWeapon() const;
private:
Character();
std::string m_name;
int m_ap;
AWeapon* m_weapon;
};
std::ostream& operator<<(std::ostream& out, Character const& c);
#endif
|