aboutsummaryrefslogtreecommitdiff
path: root/cpp04/ex01/Character.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp04/ex01/Character.hpp')
-rw-r--r--cpp04/ex01/Character.hpp46
1 files changed, 46 insertions, 0 deletions
diff --git a/cpp04/ex01/Character.hpp b/cpp04/ex01/Character.hpp
new file mode 100644
index 0000000..04da9fc
--- /dev/null
+++ b/cpp04/ex01/Character.hpp
@@ -0,0 +1,46 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* Character.hpp :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2020/04/14 13:42:25 by charles #+# #+# */
+/* Updated: 2020/04/14 14:09:51 by charles ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+#ifndef CHARACTER_HPP
+# define CHARACTER_HPP
+
+# include <iostream>
+# include <string>
+# include "AWeapon.hpp"
+# include "Enemy.hpp"
+
+class Character
+{
+public:
+ Character(Character const& other);
+ void 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