aboutsummaryrefslogtreecommitdiff
path: root/cpp04/ex01/AWeapon.cpp
blob: 9c53839d831973fbaed96942302261b18d584ae4 (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
44
45
46
47
48
49
50
51
52
53
/* ************************************************************************** */
/*                                                                            */
/*                                                        :::      ::::::::   */
/*   AWeapon.cpp                                        :+:      :+:    :+:   */
/*                                                    +:+ +:+         +:+     */
/*   By: charles <charles.cabergs@gmail.com>        +#+  +:+       +#+        */
/*                                                +#+#+#+#+#+   +#+           */
/*   Created: 2020/04/14 12:16:04 by charles           #+#    #+#             */
/*   Updated: 2020/04/14 13:18:07 by charles          ###   ########.fr       */
/*                                                                            */
/* ************************************************************************** */

#include "AWeapon.hpp"

AWeapon::AWeapon(AWeapon const& other)
{
    *this = other;
}

void AWeapon::operator=(AWeapon const& other)
{
    m_name = other.m_name;
    m_apcost = other.m_apcost;
    m_damage = other.m_damage;
}

AWeapon::~AWeapon()
{
}

AWeapon::AWeapon(std::string const& name, int apcost, int damage)
    : m_name(name), m_apcost(apcost), m_damage(damage)
{
}

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()
{
}