This repository was archived by the owner on Feb 2, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +0
-22
lines changed
Expand file tree Collapse file tree 1 file changed +0
-22
lines changed Original file line number Diff line number Diff line change 4949 hamsterHuey.destroy(); // returns 'Game object was removed from the game.'
5050*/
5151
52- /*
53- GameObject
54- createdAt
55- dimensions
56- destroy() // prototype method -> returns the string 'Game object was removed from the game.'
57- */
5852function GameObject ( options ) {
5953 this . createdAt = options . createdAt ;
6054 this . dimensions = options . dimensions ;
@@ -63,13 +57,6 @@ GameObject.prototype.destroy = function () {
6357 return 'Game object was removed from the game.' ;
6458} ;
6559
66- /*
67- NPC
68- hp
69- name
70- takeDamage() // prototype method -> returns the string '<object name> took damage.'
71- // should inherit destroy() from GameObject's prototype
72- */
7360function NPC ( options ) {
7461 GameObject . call ( this , options ) ;
7562 this . hp = options . hp ;
@@ -80,15 +67,6 @@ NPC.prototype.takeDamage = function () {
8067 return `${ this . name } took damage.` ;
8168} ;
8269
83- /*
84- Humanoid
85- faction
86- weapons
87- language
88- greet() // prototype method -> returns the string '<object name> offers a greeting in <object language>.'
89- // should inherit destroy() from GameObject through NPC
90- // should inherit takeDamage() from NPC
91- */
9270function Humanoid ( options ) {
9371 NPC . call ( this , options ) ;
9472 this . faction = options . faction ;
You can’t perform that action at this time.
0 commit comments