namespace ftt.Gameplay.AI
{
    /*
     * [Root Node]
     *  This is the entry point for every Behaviour Tree created in the game.
     */
    public class BehaviourTree : INode
    {
        MinotaurNodeData nodeData;
        INode root;

        public BehaviourTree(INode root, MinotaurNodeData nodeData)
        {
            this.root = root;
            this.nodeData = nodeData;
        }

        /// <summary>
        /// Call to update the branches of the BT.
        /// </summary>
        public bool Run()
        {
            return root.Run();
        }

        /// <summary>
        /// Call to get the node data attached to THIS behaviour tree.
        /// </summary>
        public MinotaurNodeData GetNodeData()
        {
            return nodeData;
        }
    }
}