package electrosphere.server.ai;

/**
 * A behavior tree encapsulating some type of 
 */
public interface AITree {
    
    /**
     * Simulates a single frame of logic for the ai.
     * This is where the ai actually makes the entity do something
     */
    public void simulate();

    /**
     * Gets the name of the tree
     * @return The tree's name
     */
    public String getTreeName();

    /**
     * Updates the state and priority of this tree.
     * This should calculate the goal of this tree every frame.
     * All state transitions should be in here.
     */
    public void updateStateAndPriority();

    /**
     * Gets the name of the current state of this ai
     * @return The name
     */
    public String getCurrentStateName();

    /**
     * Gets the priority of the current state of this ai
     * The priority increases with the value of the int. IE, a priority of 1 is of greater importance than a priority of 0.
     * @return The priority
     */
    public int getCurrentStatePriority();
    
}
