ConceptCreator/e2e/game-model/gamesystems/actions/SimpleActionTrainer.ts
Sebastian Böckelmann f07cb270f1
All checks were successful
E2E Testing / test (push) Successful in 1m30s
Add and Remove Actions from Transition
2024-02-17 16:04:31 +01:00

26 lines
1.0 KiB
TypeScript

import {SimpleState} from "../../../../src/app/game-model/gamesystems/states/SimpleState";
import {SimpleTransition} from "../../../../src/app/game-model/gamesystems/transitions/SimpleTransition";
import {Script} from "node:vm";
import {ScriptAccount} from "../../../../src/app/game-model/scriptAccounts/ScriptAccount";
import {ScriptAccountAction} from "../../../../src/app/game-model/gamesystems/actions/ScriptAccountAction";
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;
}
}