Guest User

Untitled

a guest
Mar 21st, 2018
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. class Hero{
  2. int energy;
  3. public:
  4. Hero():energy(50){}
  5. int Attack();
  6. int GetEnergy() const{ return energy; }
  7. };
  8.  
  9. int Hero::Attack(){
  10. energy -= 10;
  11. int a;
  12. cout << endl;
  13. cout << "正義の力を受けてみよ!" << endl;
  14. cout << "(0〜9の半角数字で、攻撃位置を指示してください。)" << endl;
  15. cin >> a;
  16. return a;
  17. }
Add Comment
Please, Sign In to add comment