Wip: Working on room movements, player location in room, and data storage

This commit is contained in:
Timothy O'Barr
2026-09-11 16:07:17 -05:00
parent 0e7406db96
commit b9104dad64
13 changed files with 79 additions and 62 deletions
+3 -12
View File
@@ -7,36 +7,27 @@
class Player : Creature {
private:
private:
// Inventory inventory;
// Lets keep the room a loose reference to avoid to many hardcoded details and other info
int curRoomID = -1;
int prevRoomID = -1;
public:
Player();
Player(Player &rhs);
Player& operator=(Player& rhs);
Player &operator=(Player &rhs);
void Init() override;
void LevelUp() override;
void Die() override;
void TakeDamage(int damageType, float damage) override;
float GetHealth() override;
void ChangeRoom(int roomID);
inline friend void swap(Player& lhs, Player &rhs) noexcept
{
inline friend void swap(Player &lhs, Player &rhs) noexcept {
using std::swap;
swap(lhs.id, rhs.id);
swap(lhs.name, rhs.name);
swap(lhs.description, rhs.description);
swap(lhs.stats, rhs.stats);
swap(lhs.level, rhs.level);
swap(lhs.prevRoomID, rhs.prevRoomID);
swap(lhs.curRoomID, rhs.curRoomID);
}
~Player();