--- /dev/null
+#include "Character.h"
+#include "ICharacter.h"
+#include "AMateria.h"
+#include <string>
+
+Character::Character()
+{
+}
+
+Character::Character(const std::string &name)
+ : m_name(name)
+{
+ for (size_t i(0); i < INVENTORY_SIZE; ++i)
+ inventory[i] = NULL;
+}
+
+Character::Character(const Character &other)
+ : m_name(other.m_name)
+{
+ for (size_t i(0); i < INVENTORY_SIZE; ++i)
+ {
+ if (other.inventor[i] == NULL)
+ inventory[i] = NULL;
+ else
+ inventory[i] = other.inventory[i]->clone();
+ }
+}
+
+Character::~Character()
+{
+ for (size_t i(0); i < INVENTORY_SIZE; ++i)
+ delete inventory[i];
+}
+
+Character &Character::operator=(const Character &other)
+{
+}
+
+void Character::equip(AMateria *materia)
+{
+ for (size_t i(0); i < INVENTORY_SIZE; ++i)
+ if (m_inventory[i] == NULL)
+ {
+ m_inventory[i] = materia
+ return ;
+ }
+}
+
+void Character::unequip(int idx)
+{
+ if (idx < 0 || idx >= INVENTORY_SIZE)
+ return ;
+ m_inventory[idx] = NULL;
+}
+
+void Character::use(int idx, ICharacter &target)
+{
+ if (idx < 0 || idx >= INVENTORY_SIZE)
+ return ;
+ if (m_inventory[i] == NULL)
+ return ;
+ m_inventory[i]->use(target);
+}
+
+const std::string &Character::getName() const
+{
+ return (m_name);
+}
--- /dev/null
+#ifndef CHARACTER_H
+# define CHARACTER_H
+
+# include "ICharacter.h"
+# include "AMateria.h"
+# include <string>
+
+class Character : public ICharacter
+{
+ private:
+ Character();
+ Character(const Character &other);
+
+ Character &operator=(const Character &other);
+
+ static const size_t INVENTORY_SIZE = 4;
+
+ const std::string m_name;
+ AMateria *m_inventory[INVENTORY_SIZE];
+
+ public:
+ Character(std::string name);
+ ~Character();
+
+ void equip(AMateria *materia);
+ void unequip(int idx);
+ void use(int idx, ICharacter &target);
+
+};
+
+#endif // CHARACTER_H
--- /dev/null
+#ifndef ICHARACTER_H
+# define ICHARACTER_H
+
+class ICharacter
+{
+ public:
+ virtual ~ICharacter() {}
+
+ virtual const std::string &getName() const = 0;
+ virtual void equip(AMateria *m) = 0;
+ virtual void unequip(int idx) = 0;
+ virtual void use(int idx, ICharacter &target) = 0;
+};
+
+#endif // ICHARACTER_H