45 lines
791 B
C++
45 lines
791 B
C++
#include "player.h"
|
|
#include <algorithm>
|
|
#include <string>
|
|
|
|
Player::Player() { Init(); }
|
|
|
|
Player::Player(Player &rhs) {
|
|
id = rhs.id;
|
|
level = rhs.level;
|
|
stats = rhs.stats;
|
|
name = rhs.name;
|
|
description = rhs.description;
|
|
}
|
|
|
|
Player &Player::operator=(Player &rhs) {
|
|
swap(*this, rhs);
|
|
return *this;
|
|
}
|
|
|
|
void Player::Init() {
|
|
// initialize stats, room location, inventory and item data
|
|
stats = Stats{100.0f, 50.00f, 150.00f, 50.00f};
|
|
name = "Player";
|
|
}
|
|
|
|
void Player::LevelUp() {}
|
|
|
|
void Player::Die() {
|
|
// Now. You must, die!
|
|
}
|
|
|
|
void Player::TakeDamage(int damageType, float damage) {
|
|
// Ouch
|
|
}
|
|
|
|
float Player::GetHealth() { return 0.0f; }
|
|
|
|
Player::~Player() {
|
|
id = -1;
|
|
level = -1;
|
|
stats = {};
|
|
name.erase();
|
|
description.erase();
|
|
}
|