#ifndef libpoly092986127876186578684563243
#define libpoly092986127876186578684563243

#include <vector>
#include <memory>
#include <ostream>

void test(); // prints to stdout to test linking

struct LP_Point {
    double x, y;
    auto operator<=>(const LP_Point&) const = default;
};

struct LP_Polygon {
    std::vector< LP_Point > points;
    LP_Polygon(std::vector< LP_Point >&& p) : points(p) {}
    LP_Polygon() {}
};

class LP_Task : public std::enable_shared_from_this< LP_Task > {
struct Private{ explicit Private() = default; };

public:
    LP_Task(Private) {}
    static std::shared_ptr<LP_Task> create() {
        return std::make_shared<LP_Task>(Private());
    }

    std::shared_ptr<LP_Task> getptr() {
        return shared_from_this();
    }
    LP_Task(LP_Polygon&& _p): p(_p), minimal_triangulation(MAXFLOAT){};

    LP_Polygon p;
    double minimal_triangulation;
};

using LP_Task_p = std::shared_ptr< LP_Task >;

LP_Task_p pickup_task();
bool submit_task(LP_Task_p&&);

#endif // libpoly092986127876186578684563243