js doc composer for interop with visual paradigm
This commit is contained in:
@@ -24,7 +24,7 @@ class GamesManager{
|
||||
/**
|
||||
* Reads game definition by ID
|
||||
* @param {Number} id game ID
|
||||
* @returns {Game}
|
||||
* @returns {Game} the game
|
||||
*/
|
||||
this.read = async function(id){
|
||||
|
||||
@@ -50,7 +50,7 @@ class GamesManager{
|
||||
/**
|
||||
* Returns a set of games by given criteria
|
||||
* @param {Query} query criteria
|
||||
* @returns {Game[]}
|
||||
* @returns {Game[]} Array of games
|
||||
*/
|
||||
this.list = async function(query){
|
||||
|
||||
@@ -73,18 +73,15 @@ class GamesManager{
|
||||
class Game {
|
||||
/**
|
||||
* Game name
|
||||
* @type string
|
||||
* @type {string}
|
||||
*/
|
||||
name = null;
|
||||
|
||||
/**
|
||||
* Game formal description
|
||||
* @type GameDefinition
|
||||
* @type {GameDefinition}
|
||||
*/
|
||||
definition = {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
levels:[
|
||||
{
|
||||
name: 'Level 1',
|
||||
|
||||
@@ -73,10 +73,114 @@ class ScenariosManager{
|
||||
class Scenario {
|
||||
/**
|
||||
* Scenario name
|
||||
* @type string
|
||||
* @type {string}
|
||||
*/
|
||||
name = null;
|
||||
|
||||
/**
|
||||
* Scenario levels
|
||||
* @type {Level[]}
|
||||
*/
|
||||
levels = [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Game scenario level
|
||||
*/
|
||||
class Level {
|
||||
/**
|
||||
* Scenario name
|
||||
* @type {string}
|
||||
*/
|
||||
name = null;
|
||||
|
||||
/**
|
||||
* Active objects
|
||||
* @type {LevelObject[]}
|
||||
*/
|
||||
activeObjects = []
|
||||
}
|
||||
|
||||
/**
|
||||
* Game object associated to a level
|
||||
*/
|
||||
class LevelObject {
|
||||
/**
|
||||
* Associated game object
|
||||
* @type {GameObject}
|
||||
*/
|
||||
gameObject = null;
|
||||
|
||||
/**
|
||||
* Available actions
|
||||
* @type {GameAction}
|
||||
*/
|
||||
actions = []
|
||||
}
|
||||
|
||||
/**
|
||||
* Action associated to game object
|
||||
*/
|
||||
class GameAction {
|
||||
/**
|
||||
* Scenario name
|
||||
* @type {string}
|
||||
*/
|
||||
name = null;
|
||||
|
||||
/**
|
||||
* Scenario name
|
||||
* @type {string}
|
||||
*/
|
||||
description = null;
|
||||
|
||||
/**
|
||||
* Associated inventory item
|
||||
* @type {InventoryItem}
|
||||
*/
|
||||
inventoryItem = null;
|
||||
|
||||
/**
|
||||
* Available outcomes from the action
|
||||
* @type {GameActionResult}
|
||||
*/
|
||||
results = []
|
||||
}
|
||||
|
||||
/**
|
||||
* Result associated to game action
|
||||
*/
|
||||
class GameActionResult{
|
||||
pointsRuleDefinition = null;
|
||||
|
||||
/**
|
||||
* Scenario name
|
||||
* @type {string}
|
||||
*/
|
||||
name = null;
|
||||
|
||||
/**
|
||||
* Scenario name
|
||||
* @type {string}
|
||||
*/
|
||||
description = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Inventory item required to perform specific action
|
||||
*/
|
||||
class InventoryItem {
|
||||
/**
|
||||
* Scenario name
|
||||
* @type {string}
|
||||
*/
|
||||
name = null;
|
||||
|
||||
/**
|
||||
* Scenario name
|
||||
* @type {string}
|
||||
*/
|
||||
description = null;
|
||||
}
|
||||
|
||||
export { ScenariosManager }
|
||||
Reference in New Issue
Block a user