Initialize files from GitLab repository
This commit is contained in:
53
lib/items/Armor.cpp
Normal file
53
lib/items/Armor.cpp
Normal file
@@ -0,0 +1,53 @@
|
||||
#include "../../include/items/Armor.h"
|
||||
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
// This constructor just initializes the Armor to null.
|
||||
Armor::Armor()
|
||||
{
|
||||
name = "No Armor Equipped";
|
||||
health = 0;
|
||||
hits_remaining = 0;
|
||||
upgrades_remaining = 0;
|
||||
value = 0;
|
||||
}
|
||||
|
||||
// This constructor just initializes the Armor to the passed values.
|
||||
Armor::Armor(string armor_name, int health_added, int cost)
|
||||
{
|
||||
name = armor_name;
|
||||
health = health_added;
|
||||
hits_remaining = 150;
|
||||
upgrades_remaining = 3;
|
||||
value = cost;
|
||||
}
|
||||
|
||||
// SETTER FUNCTIONS
|
||||
|
||||
// GETTER FUNCTIONS
|
||||
|
||||
string Armor::getArmorName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
int Armor::getArmorHealth()
|
||||
{
|
||||
return health;
|
||||
}
|
||||
|
||||
int Armor::getArmorHitsRemaining()
|
||||
{
|
||||
return hits_remaining;
|
||||
}
|
||||
|
||||
int Armor::getArmorUpgradesRemaining()
|
||||
{
|
||||
return upgrades_remaining;
|
||||
}
|
||||
|
||||
int Armor::getArmorValue()
|
||||
{
|
||||
return value;
|
||||
}
|
||||
Reference in New Issue
Block a user