Skip to content

Commit 24368e9

Browse files
committed
Removed unnamed functions
1 parent 725f809 commit 24368e9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/prototype.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function GameObject(options) {
5353
this.dimensions = options.dimensions;
5454
}
5555

56-
GameObject.prototype.destroy = function () {
56+
GameObject.prototype.destroy = function destroy() {
5757
return 'Game object was removed from the game.';
5858
};
5959

@@ -64,7 +64,7 @@ function NPC(options) {
6464
}
6565

6666
NPC.prototype = Object.create(GameObject.prototype);
67-
NPC.prototype.takeDamage = function () {
67+
NPC.prototype.takeDamage = function takeDamage() {
6868
return `${this.name} took damage.`;
6969
};
7070

@@ -76,7 +76,7 @@ function Humanoid(options) {
7676
}
7777

7878
Humanoid.prototype = Object.create(NPC.prototype);
79-
Humanoid.prototype.greet = function () {
79+
Humanoid.prototype.greet = function greet() {
8080
return `${this.name} offers a greeting in ${this.language}.`;
8181
};
8282
/* eslint-disable no-undef */

0 commit comments

Comments
 (0)