At the heart of every competitive event, there are players who participate in the event. In this exercise, you will write Javascript objects to represent players and touraments.
Tests are provided that describe both players and tournaments. To run the tests, open the SpecRunner.html
file in the browser. Write code to make the tests pass. Use the constructor functions to assign properties unique to each instance of a player or tournament. Use the constructor's prototype for properties shared among instances.
Complete the player model before moving to the tournament.
This challenge is another opportunity to design JavaScript objects. We should be feeling more and more comfortable working with constructor functions and prototypes. Check in with an instructor if you're struggling to understand these conceptually or struggling to implement them in code.