#pragma once #include "WeaponObject.h" #include "ArmorObject.h" #include "PtrList.h" class Dungeon; class Location; class Player { public: String name; unsigned int health_points = 20; float attack_chance = 0.4; unsigned int gold = 0; WeaponObject * weapon = nullptr; ArmorObject * armor = nullptr; bool cheating = false; PtrList inventory; private: Location * location = nullptr; public: Player(Dungeon & dungeon); virtual ~Player() = default; public: void take_damage(unsigned int dmg); float get_attack() const; unsigned get_health() const; Location & get_location() const; void set_location(Location &); void equip(WeaponObject *); void equip(ArmorObject *); bool is_dead() const; private: Dungeon & dungeon; };