Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Hero{
- int energy;
- public:
- Hero():energy(50){}
- int Attack();
- int GetEnergy() const{ return energy; }
- };
- int Hero::Attack(){
- energy -= 10;
- int a;
- cout << endl;
- cout << "正義の力を受けてみよ!" << endl;
- cout << "(0〜9の半角数字で、攻撃位置を指示してください。)" << endl;
- cin >> a;
- return a;
- }
Add Comment
Please, Sign In to add comment