aboutsummaryrefslogtreecommitdiff
path: root/cpp04/ex03/AMateria.hpp
blob: 65d5cc50c3d11371c5c330ee7cb2697c289fda60 (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
/* ************************************************************************** */
/*                                                                            */
/*                                                        :::      ::::::::   */
/*   AMateria.hpp                                       :+:      :+:    :+:   */
/*                                                    +:+ +:+         +:+     */
/*   By: charles <charles.cabergs@gmail.com>        +#+  +:+       +#+        */
/*                                                +#+#+#+#+#+   +#+           */
/*   Created: 2020/04/14 16:24:00 by charles           #+#    #+#             */
/*   Updated: 2020/04/14 17:55:18 by charles          ###   ########.fr       */
/*                                                                            */
/* ************************************************************************** */

#ifndef AMATERIA_HPP
# define AMATERIA_HPP

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

class AMateria
{
public:
    AMateria(AMateria const& other);
    void 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 instead of m_xp
};

#endif