-
Notifications
You must be signed in to change notification settings - Fork 6
PopologyTower
emilplane edited this page Oct 11, 2024
·
1 revision
The PopologyTower class handles a tower blueprint. A tower blueprint holds all raw data related to a tower. It is used by creating an instance of the class using a blueprint object, as follows:
import PopologyTower from "./popologyTower.js";
// Blueprint has been simplified
const wizardMonkey = {
"name": "wizardMonkey", "displayName": "Wizard Monkey",
"aliases": [...],
"upgradeNames": [...],
"upgrades": {...}
}
const popologyTower = new PopologyTower(wizardMonkey)This class validates the blueprint using a JSON schema and the Ajv7 schema validator to ensure that the blueprint is valid down to the property level.