Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // PvP - hp, atk, agi
- #include <iostream>
- #include <cstdlib>
- #include <ctime>
- #include "player2.h"
- using namespace std;
- int main(){
- srand(time(NULL));
- // name , hp , atk, agi
- Player p1("fighter", 100, 110, (rand() % 20 + 1) + 25 ); // 25 - 40
- Player p2("Boss", 200, 50, (rand() % 40 + 1) + 20); // 20 - 60
- while(p1.isAlive() && p2.isAlive()){
- p2.combat(p2,p1);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement