Created
March 1, 2018 08:20
-
-
Save AlexLo33/5ec2d536ca0ce0fbeefced30e35c6ae9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(() => { | |
'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