Knight.cpp
 1  #include "Knight.h"
 2  #include <iostream>
 3  using namespace std;
 4  
 5  // [��缭] �⺻�� Hp=100, Attack=10
 6  Knight::Knight() : _hp(100), _attack(10)
 7  {
 8  
 9  }
10  
11  Knight::Knight(int hp) : _hp(hp), _attack(10)
12  {
13  
14  }
15  
16  Knight::~Knight()
17  {
18  
19  }
20  
21  void Knight::AddHp(int value)
22  {
23  	_hp += value;
24  }
25  
26  bool Knight::IsDead()
27  {
28  	return (_hp <= 0);
29  }
30  
31  void Knight::PrintInfo()
32  {
33  	cout << "HP: " << _hp << endl;
34  	cout << "ATT: " << _attack << endl;
35  }