changed all non-owned unique_ptr access to reference to the object itself

This commit is contained in:
2024-07-11 22:15:15 -04:00
parent 6d3e8229df
commit c68330b3e3
17 changed files with 73 additions and 57 deletions

View File

@ -19,16 +19,13 @@
// #include "inventory.h" // Reserved for later
class character; // forward declaration
extern RNG rng;
// Note: player should not be in the character list
typedef std::vector<character> character_list;
class character {
public:
character(const race &nrace); // fills out the starting stats
~character(); // placeholder
character(RNG &rng, const race &nrace); // fills out the starting stats
// usually I wouldn't do this but considering that the map has
// a super small size an O(n) solution is acceptable
@ -69,6 +66,7 @@ public:
// void apply_buff(const stat_name statn, const float mul);
// reserved for later
protected:
RNG &rng;
const enum race race;
int HP;