From 81cda122a496d9687f8ce6f6d389e53cfdc95254 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ckelmann?= Date: Sat, 10 Feb 2024 10:26:56 +0100 Subject: [PATCH] Fix failing test (include duplicate check) --- src/app/game-model/GameModel.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/game-model/GameModel.ts b/src/app/game-model/GameModel.ts index 9e2a514..ac4d355 100644 --- a/src/app/game-model/GameModel.ts +++ b/src/app/game-model/GameModel.ts @@ -25,7 +25,10 @@ export class GameModel { } addGamesystem(gamesystem: Gamesystem) { - this._gamesystems.push(gamesystem); + if(this.findGamesystem(gamesystem.componentName) == undefined) { + this._gamesystems.push(gamesystem); + } + } removeGamesystem(gamesystem : Gamesystem) {