added item base class for gold and potions
This commit is contained in:
11
src/gold.h
11
src/gold.h
@ -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;
|
||||
|
Reference in New Issue
Block a user