#include <algorithm>
#include <iostream>
#include <strings.h>
#include <vector>

#include "math/vec2.h"
#include "scene.h"
#include "engine/util.h"

#ifndef NODE_H
#define NODE_H

class Node {
private:
    // Methods
    void updateChildren();

    void pollChildInputs();

public:
    // Constructor and Destructor
    Node();

    ~Node();

    // Methods
    virtual void update();

    virtual void pollInputs();

    virtual void free();

    void addChild(Node *child);

    // Member Variables
    std::string name;
    Vec2 worldPosition = Vec2(0, 0);
    Vec2 localPosition = Vec2(0, 0);
    Scene *scene = nullptr;
    Node *parent = nullptr;
    std::vector<Node *> children;
};

#endif