#ifndef MACHINE_BLOCK_MIXIN_HPP_
#define MACHINE_BLOCK_MIXIN_HPP_

#include <Block/IMachineBlock.hpp>

/**
 * @brief A mixin to implement `IMachineBlock` given a `Machine` subclass.
 * 
 * @tparam TMachine The machine type (must be a `Machine` subclass).
 */
template<typename TMachine>
class MachineBlockMixin : public IMachineBlock
{
public:
    virtual std::shared_ptr<Machine> initMachine(LocalWorld &world, glm::ivec3 pos) override
    {
        return std::make_shared<TMachine>(world, pos);
    }
};

#endif