You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Instances of Humanoid should have all of the same properties as CharacterStats and GameObject.
72
+
* Instances of CharacterStats should have all of the same properties as GameObject.
73
+
*/
41
74
42
75
// Test you work by un-commenting these 3 objects and the list of console logs below:
43
76
44
-
/*
77
+
45
78
constmage=newHumanoid({
46
79
createdAt: newDate(),
47
80
dimensions: {
@@ -102,9 +135,9 @@
102
135
console.log(archer.greet());// Lilith offers a greeting in Elvish.
103
136
console.log(mage.takeDamage());// Bruce took damage.
104
137
console.log(swordsman.destroy());// Sir Mustachio was removed from the game.
105
-
*/
106
138
107
-
// Stretch task:
108
-
// * Create Villain and Hero constructor functions that inherit from the Humanoid constructor function.
109
-
// * Give the Hero and Villains different methods that could be used to remove health points from objects which could result in destruction if health gets to 0 or drops below 0;
110
-
// * Create two new objects, one a villain and one a hero and fight it out with methods!
139
+
140
+
// Stretch task:
141
+
// * Create Villain and Hero constructor functions that inherit from the Humanoid constructor function.
142
+
// * Give the Hero and Villains different methods that could be used to remove health points from objects which could result in destruction if health gets to 0 or drops below 0;
143
+
// * Create two new objects, one a villain and one a hero and fight it out with methods!
0 commit comments