aboutsummaryrefslogtreecommitdiff
path: root/cpp04/ex03/AMateria.hpp
blob: 41ef1324cab2ce75e793d7ec8354193880bf3824 (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
/* ************************************************************************** */
/*                                                                            */
/*                                                        :::      ::::::::   */
/*   AMateria.hpp                                       :+:      :+:    :+:   */
/*                                                    +:+ +:+         +:+     */
/*   By: charles <charles.cabergs@gmail.com>        +#+  +:+       +#+        */
/*                                                +#+#+#+#+#+   +#+           */
/*   Created: 2020/04/14 16:24:00 by charles           #+#    #+#             */
/*   Updated: 2020/11/13 14:42:03 by cacharle         ###   ########.fr       */
/*                                                                            */
/* ************************************************************************** */

#ifndef AMATERIA_HPP
# define AMATERIA_HPP

# include <string>
# include "ICharacter.hpp"

class ICharacter;

class AMateria
{
public:
    AMateria(AMateria const& other);
    AMateria& operator=(AMateria const& other);
    virtual ~AMateria();

    AMateria(std::string const& type);

    std::string const& getType() const;
    unsigned int       getXP()   const;

    virtual AMateria* clone() const = 0;
    virtual void      use(ICharacter& target);

protected:
    AMateria();

    std::string  m_type;
    unsigned int _xp;  // subject force _xp
};

#endif