17 lines
360 B
C++
17 lines
360 B
C++
#include "player.h"
|
|
#include <iostream>
|
|
|
|
Player::Player(std::string _name)
|
|
{
|
|
this->name = _name;
|
|
hp = 100;
|
|
atk = 10;
|
|
gold = 0;
|
|
}
|
|
|
|
void Player::showStats() {
|
|
std::cout << "\n === " << this->name << "'s STATS ===";
|
|
std::cout << "\nHP : " << this->hp;
|
|
std::cout << "\nATK : " << this->atk;
|
|
std::cout << "\nGOLD : " << this->gold;
|
|
} |