Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
432 B
2
Indexable
Never
import Race from './Race';

class Orc extends Race {
  private _maxLifePoints: number;
  private static _orcInstances = 0;

  constructor(name: string, dexterity: number) {
    super(name, dexterity);
    this._maxLifePoints = 74;
    Orc._orcInstances += 1;
  }

  get maxLifePoints(): number {
    return this._maxLifePoints;
  }

  static createdRacesInstances(): number {
    return Orc._orcInstances;
  }
}

export default Orc;
Leave a Comment