refactors

This commit is contained in:
Kim Ravn Hansen
2025-10-21 23:55:52 +02:00
parent bebd4ce944
commit 9de5140e47
6 changed files with 69 additions and 50 deletions

View File

@@ -9,28 +9,28 @@
* or magical portals to distant locations.
*/
export class Location {
/** @protected @type {string} */
_id;
/** @type {string} */
#id;
get id() {
return this._id;
return this.#id;
}
/** @protected @type {string} */
_name;
/** @type {string} */
#name;
get name() {
return this._name;
return this.#name;
}
/** @protected @type {string} */
_description;
/** @type {string} */
#description;
get description() {
return this._description;
return this.#description;
}
/** @protected @type {Map<string,Portal>} */
_portals = new Map();
/** @type {Map<string,Portal>} */
#portals = new Map();
get portals() {
return this._portals;
return this.#portals;
}
/**
@@ -39,8 +39,8 @@ export class Location {
* @param {string} description
*/
constructor(id, name, description) {
this._id = id;
this._name = name;
this._description = description;
this.#id = id;
this.#name = name;
this.#description = description;
}
}