Advertisement
uopspop

main.c

Apr 17th, 2016
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 KB | None | 0 0
  1. // PvP - hp, atk, agi
  2. #include <iostream>
  3. #include <cstdlib>
  4. #include <ctime>
  5. #include "player2.h"
  6. using namespace std;
  7.  
  8.  
  9.  
  10. int main(){
  11.     srand(time(NULL));
  12.             // name    , hp , atk,            agi
  13.     Player p1("fighter", 100, 110, (rand() % 20 + 1) + 25 ); // 25 - 40
  14.     Player p2("Boss", 200, 50, (rand() % 40 + 1) + 20); // 20 - 60
  15.  
  16.     while(p1.isAlive() && p2.isAlive()){
  17.         p2.combat(p2,p1);
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement