Untitled
unknown
plain_text
7 months ago
446 B
2
Indexable
Never
import Race from './Race'; class Dwarf extends Race { private static _dwarfInstances = 0; private _maxLifePoints: number; constructor(name: string, dexterity: number) { super(name, dexterity); this._maxLifePoints = 80; Dwarf._dwarfInstances += 1; } get maxLifePoints(): number { return this._maxLifePoints; } static createdRacesInstances(): number { return Dwarf._dwarfInstances; } } export default Dwarf;
Leave a Comment