41 lines
547 B
C++
41 lines
547 B
C++
#include "Weapon.hpp"
|
|
|
|
#include <iostream>
|
|
#include <string>
|
|
|
|
Weapon::Weapon()
|
|
{
|
|
std::cout << "Weapon()" << std::endl;
|
|
}
|
|
|
|
Weapon::Weapon(const Weapon& src)
|
|
{
|
|
this->_type = src._type;
|
|
}
|
|
|
|
Weapon::Weapon(const std::string& type)
|
|
{
|
|
this->_type = type;
|
|
}
|
|
|
|
Weapon::~Weapon()
|
|
{
|
|
std::cout << "Weapon()" << std::endl;
|
|
}
|
|
|
|
Weapon& Weapon::operator=(const Weapon &src)
|
|
{
|
|
this->_type = src._type;
|
|
return *this;
|
|
}
|
|
|
|
void Weapon::setType(const std::string& newType)
|
|
{
|
|
this->_type = newType;
|
|
}
|
|
|
|
const std::string& Weapon::getType()
|
|
{
|
|
return this->_type;
|
|
}
|