Typo and Deleting unused code
All checks were successful
E2E Testing / test (push) Successful in 1m36s

This commit is contained in:
Sebastian Böckelmann 2024-04-12 18:49:35 +02:00
parent b18b06e093
commit b4abd43bc0
3 changed files with 1 additions and 49 deletions

View File

@ -1,34 +0,0 @@
import {SimpleGamesystem} from "./SimpleGamesystem";
import {TemplateState} from "./states/TemplateState";
import {SimpleState} from "./states/SimpleState";
import {ScriptAccountCondition} from "./conditions/ScriptAccountCondition";
import {SimpleTransition} from "./transitions/SimpleTransition";
import {ScriptAccountAction} from "./actions/ScriptAccountAction";
export class TemplateGamesystem {
referenceGamesystem: SimpleGamesystem
templateStates: SimpleState[] = []
templateTransitions: SimpleTransition[] = []
constructor(referenceGamesystem: SimpleGamesystem) {
this.referenceGamesystem = referenceGamesystem;
}
addReferenceState(referenceState: SimpleState) {
const templateState = new SimpleState(referenceState.stateLabel, referenceState.stateDescription);
templateState.conditions = referenceState.conditions.map(condition =>
ScriptAccountCondition.constructScriptAccountCondition(condition.scriptAccount, condition.minValue, condition.maxValue)!)
this.templateStates.push(templateState)
}
addReferenceTransition(referenceTransition: SimpleTransition) {
const templateTransition = new SimpleTransition(referenceTransition.startingState, referenceTransition.endingState)
templateTransition.scriptAccountConditions = referenceTransition.scriptAccountConditions.map(condition =>
ScriptAccountCondition.constructScriptAccountCondition(condition.scriptAccount, condition.minValue, condition.maxValue)!)
templateTransition.scriptAccountActions = referenceTransition.scriptAccountActions.map(action =>
new ScriptAccountAction(action.scriptAccount, action.changingValue))
this.templateTransitions.push(templateTransition)
}
}

View File

@ -10,7 +10,7 @@ import {Transition} from "../transitions/Transition";
import {ScriptAccountAction} from "../actions/ScriptAccountAction";
import {AbstractProductGamesystemGenerator} from "./AbstractProductGamesystemGenerator";
export class ProductGamesystemGenerator extends AbstractProductGamesystemGenerator{
export class ProductGamesystemGenerator extends AbstractProductGamesystemGenerator {
protected generateBinaryProductTransition(startingState: ProductState, endingState: ProductState, usedTransition: Transition<any>, generatedTransitions: ProductTransition[]) {

View File

@ -1,14 +0,0 @@
import {Transition} from "../transitions/Transition";
import {SimpleState} from "./SimpleState";
import {ScriptAccountCondition} from "../conditions/ScriptAccountCondition";
export class TemplateState {
referenceState: SimpleState
conditions: ScriptAccountCondition[]
constructor(referenceState: SimpleState, conditions: ScriptAccountCondition[]) {
this.referenceState = referenceState;
this.conditions = conditions;
}
}