From 824249ed750a5fe83ebd4a5ceab1ab80e298ccf3 Mon Sep 17 00:00:00 2001 From: goynov Date: Wed, 27 Nov 2024 18:10:09 +0200 Subject: [PATCH] annotation --- backend/app/WebServer.js | 2 +- backend/app/bl/GamesManager.js | 18 +++--------------- backend/app/bl/ScenariosManager.js | 15 ++++++++++----- 3 files changed, 14 insertions(+), 21 deletions(-) diff --git a/backend/app/WebServer.js b/backend/app/WebServer.js index 86d7e56..92f1784 100644 --- a/backend/app/WebServer.js +++ b/backend/app/WebServer.js @@ -9,7 +9,7 @@ import helmet from 'helmet'; import { v4 as uuidv4 } from 'uuid'; /** - * The Web Server class, manages all request from the web pllatform, manages the APIs + * The Web Server class, manages all request from the web platform, manages the APIs */ class WebServer { name = 'webServer'; diff --git a/backend/app/bl/GamesManager.js b/backend/app/bl/GamesManager.js index ec1fb38..521682e 100644 --- a/backend/app/bl/GamesManager.js +++ b/backend/app/bl/GamesManager.js @@ -78,22 +78,10 @@ class Game { name = null; /** - * Game formal description - * @type {GameDefinition} + * Game scenario + * @type { Scenario } */ - definition = { - levels:[ - { - name: 'Level 1', - environment: null, - objects:[ - { - id: 15 - } - ] - } - ] - }; + scenario = null; } export { GamesManager } \ No newline at end of file diff --git a/backend/app/bl/ScenariosManager.js b/backend/app/bl/ScenariosManager.js index 8e236db..13e678c 100644 --- a/backend/app/bl/ScenariosManager.js +++ b/backend/app/bl/ScenariosManager.js @@ -151,17 +151,22 @@ class GameAction { * Result associated to game action */ class GameActionResult{ - pointsRuleDefinition = null; + + /** + * Applied rules to the specific result + * @type Rule[] + */ + rules = [] /** * Scenario name - * @type {string} + * @type string */ name = null; /** * Scenario name - * @type {string} + * @type string */ description = null; } @@ -172,13 +177,13 @@ class GameActionResult{ class InventoryItem { /** * Scenario name - * @type {string} + * @type string */ name = null; /** * Scenario name - * @type {string} + * @type string */ description = null; }