/modern-js-quiz-danrday

modern-js-quiz-danrday created by GitHub Classroom

Primary LanguageJavaScript

Modern JavaScript Developer Quiz

Robot Battledome

##My Notes:

I used some concepts that we learned in our group battlebot project to build my own game. Testing with browserify is something I need to do more research on. Jasmine was creating problems for me so I used Tape to do some simple tests. However Tape apparently does not work with jQuery.

Setup

  1. cd to your quizzes directory.

  2. Clone this repository and cd into the directory it creates.

  3. Now run the following commands.

    git checkout -b quiz
    touch index.html
    touch quiz.js
    touch quiz.css

You are now ready to work in the quiz branch.

When your work in complete, push up the branch (git push origin quiz) and submit the pull request on Github.

Instructions

Code/Tools Requirements

  1. Use ES6 language features wherever you can. At a minimum, you should be using let, const, fat arrows, property shorthand, method properties, and string templates.
  2. Have a Gulp task running at all times to validate your JavaScript. We will be validating your project and we should see 0 errors.
  3. You must have a test suite that validates the core logic of the application.
  4. You must use jQuery for interacting with the DOM.

Base Logical Requirements

You'll be building robots to battle each other.

  1. A base Robot function.
  2. Define three robot type functions (e.g. Drone, Bipedal, ATV).
  3. Define at least 2 specific robot model functions for each type.
  4. Give each robot model a different range of health. For example, one model can have health range of 50-80, and another one will have a range of 60-120. To accomplish this, read about the Math.random() function in JavaScript.
  5. Give each robot model a different range of damage they do using the same technique.

Base Functional Requirements

  1. When your user interface first loads, provide 2 text inputs to name the two robots that will do battle.
  2. You must also provide a select element underneath each text input so that the user can select one of the 6 robot models you defined.
  3. Provide a Attack! button that, when clicked, simply applies the damage output of each robot against the other one.
  4. Once either robot's health is <0 display a message that the battle is over, and which one won. For example...
The Viper Drone defeated the Behemoth ATV with its flamethrower.

Bonus Goals

Bonus Logical Requirements

These are completely optional, once you have the basic requirements met and want to practice object composition.

  1. Define at least six different modifications and six different weapons that can be added to a robot.
  2. Each modification should provide some combination of the following benefits - increased protection, increased damage, or evasion capability (ability to avoid some attacks).
  3. Define the range of damage that each weapon can do.

Bonus Functional Requirements

If you have completed the base requirements, and want to explore object composition more, you may choose to implement these requirements. They are completely optional.

  1. When your user interface first loads, provide the user with buttons so that one specific robot model can be chosen as Player 1.
  2. Once the user selects a robot model for Player 1, show a button for each weapon that can be added to the robot.
  3. Once the user selects a weapon for Player 1, show a button for each modification that can be added to the robot.
  4. Once Player 1 has a modification, provide the user with buttons so that one specific robot model can be chosen as Player 2.
  5. Once the user selects a robot model for Player 2, show a button for each weapon that can be added to the robot.
  6. Once the user selects a weapon for Player 2, show a button for each modification that can be added to the robot.
  7. Once the modification for Player 2 is chosen, the battle begins.
  8. Each round of battle should determine the amount of damage each robot will do with its weapon.
  9. That damage should then be adjusted based on the modifications that it has, and what its opponent has.
  10. Rounds continue until one of the robots has 0, or less than 0, health.
  11. When the battle is over display the outcome to the user. For example...
The Viper Drone defeated the Behemoth ATV with its flamethrower.