added item base class for gold and potions

This commit is contained in:
2024-07-18 12:54:41 -04:00
parent 8704fdb7aa
commit dfea74ed42
9 changed files with 51 additions and 65 deletions

View File

@ -4,10 +4,17 @@
#include <vector>
#include "position.h"
#include "rng.h"
#include "item.h"
struct gold {
class gold : public item {
private:
int amount;
position pos;
public:
gold(const position &pos, const int amount);
void print(output *out) const override;
int get_amount() const;
void set_amount(const int new_amount);
};
typedef std::vector<gold> gold_list;