ConceptCreator/e2e/game-model/gamesystems/GamesystemTrainer.ts
Sebastian Böckelmann b4cc5304fd
All checks were successful
E2E Testing / test (push) Successful in 1m27s
Find Gamesystems By Name in GameModel
2024-02-09 20:04:52 +01:00

38 lines
1.4 KiB
TypeScript

import {GameModel} from "../../../src/app/game-model/GameModel";
import {SimpleGamesystem} from "../../../src/app/game-model/gamesystems/SimpleGamesystem";
import {ProductGamesystem} from "../../../src/app/game-model/gamesystems/ProductGamesystem";
export class GamesystemTrainer {
static GAMEMODELNAME: string = "GAMEMODEL";
static SIMPLEGAMESYSTEMNAME: string = "SIMPLE GAMESYSTEM";
static TOP_PRODUCT_GAMESYSTEM_NAME: string = "Top Product Gamesystem"
static SIMPLEGAMESYSTEM2: string = "Simple Gamesystem Leaf 2";
static givenEmptyGameModel() {
return new GameModel(GamesystemTrainer.GAMEMODELNAME);
}
static givenGameModelWithSimpleGamesystemOnTopLayer() {
const gameModel = new GameModel(GamesystemTrainer.GAMEMODELNAME);
const gamesytem = new SimpleGamesystem(GamesystemTrainer.SIMPLEGAMESYSTEMNAME);
gameModel.addGamesystem(gamesytem);
return gameModel;
}
static givenGameModelWithProductGamesytemOnTopLayer() {
const gameModel = new GameModel(GamesystemTrainer.GAMEMODELNAME);
const productGamesystem = new ProductGamesystem(this.TOP_PRODUCT_GAMESYSTEM_NAME);
const leaf1 = new SimpleGamesystem(this.SIMPLEGAMESYSTEMNAME);
const leaf2 = new SimpleGamesystem(this.SIMPLEGAMESYSTEM2);
productGamesystem.innerGamesystems.push(leaf1);
productGamesystem.innerGamesystems.push(leaf2);
gameModel.addGamesystem(productGamesystem);
return gameModel;
}
}