首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > C/C++/VC++ > 玩家PK

玩家PK

  • 资源大小:304.42 kB
  • 上传时间:2021-06-29
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签: c++

资 源 简 介

#include #include #include #include #include #include using namespace std; class Role { protected: int hp,ce,de,fa; int flag; string nn; public: Role(string n, int h, int c, int d, int f):nn(n),hp(h),ce(c),de(d),fa(f) {} ~Role() {} void combat(Role &an) { if(fa>an.fa) { flag=1; loop2: cout<=ce) { an.hp--; an.de--; } else { an.hp=an.hp-ce+an.de; an.de--; } if(an.hp<0) { an.hp=0; } if(an.de<0) { an.de=0; } cout<

文 件 列 表

no1.cpp
no1.exe
VIP VIP
0.195716s