Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Knight: public Player{
- public:
- Knight() { }
- virtual ~Knight() { }
- bool canUse(Item* item) {
- if (item->getLevel() > level) return false;
- if (item->getWeight() > strength) return false;
- if (item->isMagical() == 1) return false;
- return true;
- };
- };
- class Wizard : public Player {
- public:
- Wizard() { }
- virtual ~Wizard() { }
- bool canUse(Item* item) {
- if (item->getLevel() > level) return false;
- if (item->getWeight() > strength) return false;
- return true;
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement