ConceptCreator/e2e/game-model/gamesystems/actions/SimpleActionTrainer.ts

26 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";
2024-02-17 16:04:31 +01:00
import {Script} from "node:vm";
import {ScriptAccount} from "../../../../src/app/project/game-model/scriptAccounts/ScriptAccount";
import {ScriptAccountAction} from "../../../../src/app/project/game-model/gamesystems/actions/ScriptAccountAction";
2024-02-17 16:04:31 +01:00
export class SimpleActionTrainer {
static withEmptyActions() {
const startingState = new SimpleState("Wolkig", "");
const endingState = new SimpleState("Schnee", "");
return new SimpleTransition(startingState, endingState);
}
static withSingleAction() {
const startingState = new SimpleState("Wolkig", "");
const endingState = new SimpleState("Schnee", "");
const scriptAccount = new ScriptAccount("Temperature", "");
const transition = new SimpleTransition(startingState, endingState);
transition.scriptAccountActions.push(new ScriptAccountAction(scriptAccount, 10));
return transition;
}
}