blob: 5d43cd550fcaad51faede3cce37bd7f02137c7dd (
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
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* AWeapon.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/04/14 12:16:04 by charles #+# #+# */
/* Updated: 2020/11/12 13:32:58 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
#include "AWeapon.hpp"
AWeapon::AWeapon(std::string const& name, int apcost, int damage)
: m_name(name), m_apcost(apcost), m_damage(damage)
{}
AWeapon::AWeapon(AWeapon const& other) { *this = other; }
AWeapon& AWeapon::operator=(AWeapon const& other)
{
m_name = other.m_name;
m_apcost = other.m_apcost;
m_damage = other.m_damage;
return *this;
}
AWeapon::~AWeapon() {}
std::string const& AWeapon::getName() const { return m_name; }
int AWeapon::getAPCost() const { return m_apcost; }
int AWeapon::getDamage() const { return m_damage; }
AWeapon::AWeapon() {}
|