//
// Created by bastian on 29.03.22.
//

#ifndef BUILD_RANDOMFAILURE_H
#define BUILD_RANDOMFAILURE_H

#include <behaviortree_cpp_v3/action_node.h>
#include <random>

namespace BT {
    class RandomFailure : public SyncActionNode {
    private:
        std::default_random_engine re = std::default_random_engine(random());
        std::uniform_real_distribution<double> dist = std::uniform_real_distribution<double>(0.0, 1.0);
    public:
        RandomFailure(const std::string &name, const NodeConfiguration &config);
        NodeStatus tick() override;
        static PortsList providedPorts();
    };
}

#endif //BUILD_RANDOMFAILURE_H
