Files
ASCII-G/include/inventory.h

22 lines
379 B
C++

#pragma once
#include <vector>
#include "item.h"
struct InventorySlot {
int itemId = 0;
int count = 0;
};
class Inventory {
public:
std::vector<InventorySlot> items;
void addItem(int itemId, int count = 1);
bool removeItem(int itemId, int count = 1);
void show(const std::vector<Item>& itemDatabase) const;
bool hasItem(int itemId) const;
};