Untitled
unknown
plain_text
a year ago
468 B
3
Indexable
import Race from './Race'; class Halfling extends Race { private _maxLifePoints: number; private static _halflingInstances = 0; constructor(name: string, dexterity: number) { super(name, dexterity); this._maxLifePoints = 60; Halfling._halflingInstances += 1; } get maxLifePoints(): number { return this._maxLifePoints; } static createdRacesInstances(): number { return Halfling._halflingInstances; } } export default Halfling;
Editor is loading...
Leave a Comment