/* * ===================================================================================== * * Filename: Inventory.hpp * * Description: * * Created: 21/06/2018 00:59:26 * * Author: Quentin Bazin, * * ===================================================================================== */ #ifndef INVENTORY_HPP_ #define INVENTORY_HPP_ #include #include "Types.hpp" class Inventory { public: Inventory(u16 width, u16 height) : m_width(width), m_height(height) { m_items.resize(width * height); } void setItem(u16 x, u16 y, u16 id); u16 width() const { return m_width; } u16 height() const { return m_height; } const std::vector &items() const { return m_items; } private: u16 m_width = 0; u16 m_height = 0; std::vector m_items; }; #endif // INVENTORY_HPP_