import { DialogEngine, isValidDialog } from "@common/rpg/dialog";
import dialogYml from './dialog.yml';

export default async function main() {
    // console.log(dialogYml);
    if (isValidDialog(dialogYml, ['hasSword'], [], ['player', 'npc'])) {
        const dialog = new DialogEngine(dialogYml, {
            variables: { hasSword: false },
            actions: {},
        });
        // console.log(await dialog.advance());
        for await (const node of dialog) {
            console.log(node);
        }
    }
}