/* * ===================================================================================== * * Filename: CraftingRecipe.hpp * * Description: * * Created: 24/06/2018 06:38:11 * * Author: Quentin Bazin, * * ===================================================================================== */ #ifndef CRAFTINGRECIPE_HPP_ #define CRAFTINGRECIPE_HPP_ #include #include #include "Recipe.hpp" class CraftingRecipe : public Recipe { public: CraftingRecipe(const std::vector &pattern, const std::map> &keys, const ItemStack &result, bool isShapeless = false); bool isMatching(const Inventory &inventory) const override; private: bool checkMatch(const Inventory &inventory, int offsetX, int offsetY) const; std::vector m_pattern; std::map> m_keys; bool m_isShapeless; }; #endif // CRAFTINGRECIPE_HPP_