Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
446 B
1
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