agents-flow
Version:
Framework for multi-agent interactive fiction videogame.
61 lines • 2.26 kB
TypeScript
import { TruthTable } from "first-order-logic";
import { IInteraction } from "./interfaces";
import { Agents } from "./agent";
import { MapStructure } from "./location";
import { HistoricInteractions } from "./historic";
import { Input } from "./input";
import { Step } from "./step";
export declare type ScenarioCondition = (scenario: Scenario) => boolean;
export declare class FinishingConditions {
private _conditions;
constructor();
with(condition: ScenarioCondition): FinishingConditions;
allMet(scenario: Scenario): boolean;
}
export declare class World {
private _scenarios;
private _lastScenario;
constructor();
get currentScenario(): Scenario;
add(scenario: Scenario): void;
}
export declare type ScenarioTurnPassed = (turn: number, scenario: Scenario) => string;
export declare const ScenarioEndAllConditionsMet: string;
export declare const ScenarioEndNoInteractions: string;
export declare class Scenario {
private _interactions;
private _finishingConditions;
private _globalPostconditions;
private _onTurnPassed;
private _currentInteraction;
private _selectableInteractions;
private _interactor;
private get thereIsCurrentInteraction();
private _name;
private _map;
private _agents;
private _historic;
private _isFinished;
private _turn;
private _isInheritor;
constructor(name: string, map: MapStructure, agents: Agents, interactions: IInteraction[], finishingConditions: FinishingConditions, onTurnPassed?: ScenarioTurnPassed);
get name(): string;
get map(): MapStructure;
get agents(): Agents;
get interactions(): IInteraction[];
get historic(): HistoricInteractions;
get isFinished(): boolean;
get turn(): number;
get isInheritor(): boolean;
get postconditions(): TruthTable;
inheritor(): Scenario;
performStep(input: Input): Step;
private performIAInteraction;
private getNextAgentWithInteractions;
private getNextAgentWithInteractionsAll;
private calculateAllAvailableInteractions;
private performCurrentInteractionStep;
private performHumanInteraction;
private passTurn;
}
//# sourceMappingURL=scenario.d.ts.map