ConceptCreator/e2e/game-model/gamesystems/conditions/TransitionConditionTrainer.ts
Sebastian Böckelmann 75815578dc
Some checks failed
E2E Testing / test (push) Failing after 1m39s
Fix typo in gamemodel import path in test
2024-03-22 08:10:22 +01:00

25 lines
1.1 KiB
TypeScript

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";
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;
}
}