ConceptCreator/e2e/game-model/gamesystems/conditions/TransitionConditionTrainer.ts

25 lines
1.1 KiB
TypeScript
Raw Normal View History

import {SimpleState} from "../../../../src/app/project/game-model/gamesystems/states/SimpleState";
import {SimpleTransition} from "../../../../src/app/project/game-model/gamesystems/transitions/SimpleTransition";
import {ScriptAccount} from "../../../../src/app/project/game-model/scriptAccounts/ScriptAccount";
import {ScriptAccountCondition} from "../../../../src/app/project/game-model/gamesystems/conditions/ScriptAccountCondition";
2024-02-17 19:06:38 +01:00
export class TransitionConditionTrainer {
static withTransitionWithoutConditions() {
const startingState = new SimpleState("StartingState", "");
const endingState = new SimpleState("EndingState", "");
return new SimpleTransition(startingState, endingState);
}
static withTransitionWithCondition() {
const startingState = new SimpleState("StartingState", "");
const endingState = new SimpleState("EndingState", "");
const transition = new SimpleTransition(startingState, endingState);
const scriptAccount = new ScriptAccount("ScriptAccount", "");
transition.scriptAccountConditions.push(ScriptAccountCondition.constructScriptAccountCondition(scriptAccount, 0, 10)!)
return transition;
}
}