diff --git a/src/app/project/game-model/characters/CharacterRelation.ts b/src/app/project/game-model/characters/CharacterRelation.ts index bdbd03a..ea9ecb1 100644 --- a/src/app/project/game-model/characters/CharacterRelation.ts +++ b/src/app/project/game-model/characters/CharacterRelation.ts @@ -21,6 +21,7 @@ export class CharacterRelation implements TemplateElement{ addCharacterRelationSystem(gamesystem: Gamesystem) { if((gamesystem instanceof SimpleTemplateGamesystem || gamesystem instanceof ProductTemplateSystem) && !this.isGamesystemCharacterRelationSpecific(gamesystem.componentName)) { const templateGamesystem = new ProductTemplateSystem(gamesystem.componentName, gamesystem.componentDescription, TemplateType.CHARACTER_RELATION); + templateGamesystem.symmetric = gamesystem.symmetric templateGamesystem.addChildGamesystem(gamesystem); templateGamesystem.addChildGamesystem(gamesystem); this.characterRelationGamesystems.push(templateGamesystem); diff --git a/src/app/project/game-model/gamesystems/productSystemGenerator/ProductSystemGenerator.ts b/src/app/project/game-model/gamesystems/productSystemGenerator/ProductSystemGenerator.ts index aa667a1..f001f1e 100644 --- a/src/app/project/game-model/gamesystems/productSystemGenerator/ProductSystemGenerator.ts +++ b/src/app/project/game-model/gamesystems/productSystemGenerator/ProductSystemGenerator.ts @@ -9,6 +9,7 @@ import {Gamesystem} from "../Gamesystem"; import {ProductGenerationData} from "./ProductGenerationData"; import {ProductTransition} from "../transitions/ProductTransition"; import {SimpleTemplateTransition} from "../../templates/simpleGamesystem/SimpleTemplateTransition"; +import {ProductTemplateSystem} from "../../templates/productGamesystem/ProductTemplateSystem"; export class ProductSystemGenerator { productGamesystem: ProductGamesystem @@ -106,6 +107,8 @@ export class ProductSystemGenerator { protected assignGeneratedStatesAndTransitions(generationResult: ProductGeneratorResult): void { this.productGamesystem.states = generationResult.states; this.productGamesystem.transitions = generationResult.transitions; + + console.log("General ", generationResult.transitions.length) } protected generateBinaryProductTransition(startingState: ProductState, endingState: ProductState, usedTransition: Transition, generatedTransitions: ProductTransition[], leftSystem: boolean) { diff --git a/src/app/project/game-model/gamesystems/productSystemGenerator/TemplateProductSystemGenerator.ts b/src/app/project/game-model/gamesystems/productSystemGenerator/TemplateProductSystemGenerator.ts index 9fb3666..f969da2 100644 --- a/src/app/project/game-model/gamesystems/productSystemGenerator/TemplateProductSystemGenerator.ts +++ b/src/app/project/game-model/gamesystems/productSystemGenerator/TemplateProductSystemGenerator.ts @@ -12,6 +12,7 @@ import {ScriptAccountCondition} from "../conditions/ScriptAccountCondition"; import {SimpleTemplateState} from "../../templates/simpleGamesystem/SimpleTemplateState"; import {Character} from "../../characters/Character"; import {CharacterRelation} from "../../characters/CharacterRelation"; +import {ProductGenerationData} from "./ProductGenerationData"; export class TemplateProductSystemGenerator extends ProductSystemGenerator { @@ -28,7 +29,77 @@ export class TemplateProductSystemGenerator extends ProductSystemGenerator { productTemplateSystem.transitionMap.set(this.templateElement, generationResult.transitions) productTemplateSystem.stateMap.set(this.templateElement, generationResult.states) - console.log("Test") + console.log("Symmetric", (this.productGamesystem as ProductTemplateSystem).symmetric) + console.log("Template: ", generationResult.transitions.length) + } + + protected generateFromBinaryChildsystems(leftSystemData: ProductGenerationData, rightSystemData: ProductGenerationData): ProductGeneratorResult { + const generatedProductStates: ProductState[] = [] + const generatedProductTransitions: ProductTransition[] = [] + + leftSystemData.states.forEach(leftState => { + rightSystemData.states.forEach(rightState => { + for(let i=0; i, leftSystem: boolean) {