Skip to content

Instantly share code, notes, and snippets.

@AlexLo33
Created March 1, 2018 08:20
Show Gist options
  • Save AlexLo33/5ec2d536ca0ce0fbeefced30e35c6ae9 to your computer and use it in GitHub Desktop.
Save AlexLo33/5ec2d536ca0ce0fbeefced30e35c6ae9 to your computer and use it in GitHub Desktop.
(() => {
'use script';
class Monster {
constructor(options = {}) {
this.health = 100;
this.name = options.name;
}
soigner() {
this.health += 10;
}
}
class MiniMonster extends Monster {
constructor(options = {}) {
super(options);
this.health = 50;
}
soigner() {
this.health += 5;
}
}
module.exports = {
Monster: Monster,
MiniMonster: MiniMonster
};
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment