/**
 * @template A
 * @author Alex Goldring
 * @copyright Company Named Limited (c) 2026
 */
export class ActionSequence {

    /**
     *
     * @type {A[]}
     */
    actions = [];

    /**
     * Higher priority sequences indicate that they need to be executed first
     * @type {number}
     */
    priority = 0;

    /**
     *
     * @param {number} v
     */
    setPriority(v) {
        this.priority = v;
    }

    /**
     *
     * @returns {number}
     */
    getPriority() {
        return this.priority;
    }

    /**
     *
     * @param {A} action
     */
    add(action) {
        this.actions.push(action);
    }
}
