{"size": 498, "ext": "js", "max_stars_repo_path": "src/js/systems/DialogScheduling.js", "max_stars_repo_name": "shubham2704/major-project", "max_stars_repo_stars_event_min_datetime": "2021-03-16T06:17:09.000Z", "max_stars_repo_stars_event_max_datetime": "2021-03-16T06:17:09.000Z", "max_issues_repo_path": "src/js/systems/DialogScheduling.js", "max_issues_repo_name": "shubham2704/major-project", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/js/systems/DialogScheduling.js", "max_forks_repo_name": "shubham2704/major-project", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 23.7142857143, "max_line_length": 71, "alphanum_fraction": 0.4799196787}
'use strict';

import { game } from '../Game';
import { Dialog } from '../Dialog';

/**
 * DialogScheduling
 */
export const DialogScheduling = {
    perform() {
        if (!game.dialog && !game.brawl && !game.victory) {
            for (let idx = 0; idx < Dialog.details.length; idx++) {
                if (game.dialogPending[idx] && !game.dialogSeen[idx]) {
                    game.entities.push(new Dialog(idx));
                    return;
                }
            }
        }
    }
};
