# shellcheck shell=dash

___x_cmd log init score
xrc:mod:lib     score   ls compute init iter refine

___x_cmd_score___main(){
    [ "$#" -gt 0 ]  ||      { ___x_cmd_score_ls; return $?; }

    local op="$1";          shift
    case "$op" in
        -h|--help)          ___x_cmd help -m score       "$@";    return 0 ;;
        ls|compute|init|iter|refine) ___x_cmd_score_"$op"       "$@" ;;
        *)                  ___x_cmd_score_ls "$op"     "$@" ;;
    esac
}

# ___x_cmd_score_skill_dir_ — locate skill0/score/ template directory
# Sets x_ to the path. Returns 0 if found, 1 if not.
___x_cmd_score_skill_dir_(){
    if [ -n "${___X_CMD_ROOT_SKILL0:-}" ] && [ -d "$___X_CMD_ROOT_SKILL0/core/score" ]; then
        x_="$___X_CMD_ROOT_SKILL0/core/score"
        return 0
    fi
    x_=""; return 1
}
