Cannot figure out why I am getting the error that stats is not defined when it is...
I have tried naming and renaming and calling the previously named function still getting the error
function GameObject(GO){
this.createdAt = GO.createdAt;
this.name = GO.name;
this.dimensions = GO.dimensions;
}
GameObject.prototype.destroy = function(){
return `${this.name} was removed from the game.`;
}
function CharacterStats(stats){
GameObject.call(stats);
this.healthPoints= stats.healthPoints
}
CharacterStats.prototype = Object.create(GameObject.prototype)
CharacterStats.prototype = takeDamage = function(){
return `${this.name} took damage`;
}
function Humanoid(PettyHumans){
this.team = PettyHumans.team;
this.weapons = PettyHumans.weapons;
this.language = PettyHumans.language;
CharacterStats.call(this.PettyHumans)
}
Humanoid.prototype.greet = function(){
return `${this.name} offers a greeting in ${this.language}.`;
}