From 777cf9bc1d94356e6a3936a5c0bbd0b2039d1779 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ckelmann?= Date: Tue, 19 Mar 2024 11:03:00 +0100 Subject: [PATCH] Consider state conditions in product transition generation --- .../gamesystems/ProductGamesystem.ts | 48 +++++++++-- .../gamesystems/Weathersystem/Season.json | 80 +++++++++++++++++++ .../gamesystems/Weathersystem/Weather.json | 2 +- 3 files changed, 121 insertions(+), 9 deletions(-) create mode 100644 testModel/gamesystems/Weathersystem/Season.json diff --git a/src/app/game-model/gamesystems/ProductGamesystem.ts b/src/app/game-model/gamesystems/ProductGamesystem.ts index 6166b18..01d7d1f 100644 --- a/src/app/game-model/gamesystems/ProductGamesystem.ts +++ b/src/app/game-model/gamesystems/ProductGamesystem.ts @@ -7,6 +7,7 @@ import {SimpleState} from "./states/SimpleState"; import {SimpleGamesystem} from "./SimpleGamesystem"; import {GameModel} from "../GameModel"; import {ProductStateTrainer} from "../../../../e2e/game-model/gamesystems/productGamesystems/ProductStateTrainer"; +import {ScriptAccountCondition} from "./conditions/ScriptAccountCondition"; export class ProductGamesystem extends Gamesystem { @@ -99,20 +100,34 @@ export class ProductGamesystem extends Gamesystem productInitial = productInitial && innerState.initial) + binary_productState!.initial = productInitial + + const combinedStateConditions: ScriptAccountCondition[] = leftInnerState.conditions.concat(rightInnerState.conditions) + const conditionsContradicting = false + for(let i=0; i