game is running! player can be created.
This commit is contained in:
17
player.cpp
Normal file
17
player.cpp
Normal file
@@ -0,0 +1,17 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user