#pragma once class RobotQueue; class Robot{ private: int priority; int HP; public: // constructors & destructor Robot() : priority(rand()%25+1), HP(rand()%50+10) {}; // methods int getPr() { return priority; }; int getHP() { return HP; }; void getHit(int hp) { if(hp0; }; int fight(RobotQueue &pq); // operators friend bool operator<(const Robot &a, const Robot &b); friend bool operator>(const Robot &a, const Robot &b); }; class PRobot { private: Robot *robot_pointer; public: PRobot() : robot_pointer(NULL) {}; PRobot(Robot *robot) : robot_pointer(robot) {}; operator Robot*() const { return robot_pointer; }; friend bool operator<(const PRobot &a, const PRobot &b); friend bool operator>(const PRobot &a, const PRobot &b); };