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
This challenge focuses on using the `this` keyword as well as getting comfortable with prototypes by building out a fantasy themed video game.
3
+
4
+
## Assignment Description
5
+
6
+
* Fork/Clone this repository.
7
+
* Complete all the exercises as described inside each assignment file.
8
+
* Use `console.log()` statements to check to see if your code does what it is supposed to do.
9
+
* To test your `console` statements you can run `node /assignments/<fileName>` and see what prints in your terminal. You can also use an online tool like `JSBin`, `REPL.it`, `JSFiddle`, or even your `Chrome developer console`.
10
+
* Once you finish the exercises in each file, commit your code, and push it to your fork.
11
+
12
+
### The `this` keyword
13
+
Having a solid understanding of how `this` works will give you a huge advantage when you start building with more advanced frameworks. Use the [this.js](assignments/this.js) file to traverse through a few `this` problems.
14
+
15
+
### Prototype
16
+
The prototype challenge will focus on building prototypes for a fantasy themed game that includes mages, swordsmen, and archers. Follow the [prototypes.js](assignments/this.js) instructions closely to create the beginnings of what could be an awesome JavaScript game.
17
+
18
+
* Read the instructions found within the file carefully to finish the challenges.
19
+
* Remember to uncomment the objects and console logs to test your work at the bottom of the page.
console.log(swordsman.faction); // The Round Table
100
+
console.log(mage.weapons); // Staff of Shamalama
101
+
console.log(archer.language); // Elvish
102
+
console.log(archer.greet()); // Lilith offers a greeting in Elvish.
103
+
console.log(mage.takeDamage()); // Bruce took damage.
104
+
console.log(swordsman.destroy()); // Sir Mustachio was removed from the game.
105
+
*/
106
+
107
+
// Stretch task:
108
+
// * Create Villian and Hero classes that inherit from the Humanoid class.
109
+
// * Give the Hero and Villians 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 villian and one a hero and fight it out with methods!
0 commit comments