From b4abd43bc0577396d557c6d292d7818540a486fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ckelmann?= Date: Fri, 12 Apr 2024 18:49:35 +0200 Subject: [PATCH] Typo and Deleting unused code --- .../gamesystems/TemplateGamesystem.ts | 34 ------------------- .../ProductGamesystemGenerator.ts | 2 +- .../gamesystems/states/TemplateState.ts | 14 -------- 3 files changed, 1 insertion(+), 49 deletions(-) delete mode 100644 src/app/project/game-model/gamesystems/TemplateGamesystem.ts delete mode 100644 src/app/project/game-model/gamesystems/states/TemplateState.ts diff --git a/src/app/project/game-model/gamesystems/TemplateGamesystem.ts b/src/app/project/game-model/gamesystems/TemplateGamesystem.ts deleted file mode 100644 index d7dda83..0000000 --- a/src/app/project/game-model/gamesystems/TemplateGamesystem.ts +++ /dev/null @@ -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) - } -} diff --git a/src/app/project/game-model/gamesystems/productSystemGenerator/ProductGamesystemGenerator.ts b/src/app/project/game-model/gamesystems/productSystemGenerator/ProductGamesystemGenerator.ts index 7538949..908dece 100644 --- a/src/app/project/game-model/gamesystems/productSystemGenerator/ProductGamesystemGenerator.ts +++ b/src/app/project/game-model/gamesystems/productSystemGenerator/ProductGamesystemGenerator.ts @@ -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, generatedTransitions: ProductTransition[]) { diff --git a/src/app/project/game-model/gamesystems/states/TemplateState.ts b/src/app/project/game-model/gamesystems/states/TemplateState.ts deleted file mode 100644 index d0c0caa..0000000 --- a/src/app/project/game-model/gamesystems/states/TemplateState.ts +++ /dev/null @@ -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; - } -}