Giter VIP home page Giter VIP logo

git-quest's Introduction

Manchester Codes Git-Quest

Git workflow group task.

getting started

One member of your group should fork this repository. This person should give the other members of the group write permission to the repo.

Open the repository:

  cd git-quest/

Install dependencies:

  npm install

Run tests:

  npm test

Make a dev branch:

  git checkout -b dev

Challenge

For this challenge you will be working together to add features to a pre-existing code base. You should make a dev branch from master, and each new feature should be made on a separate branch before being merged into dev.

Character

Add the following features to the Character prototype:

  • Characters should have a level property at their construction, unless otherwise stated it should be level 1.

  • Characters should have an baseAttack and baseDefense property at their construction. These should be 0 unless otherwise stated.

  • Characters should have a get attackTotal and get defenseTotal method. It should return the appropriate property added to the level. For example Character.attackTotal() should return baseAttack + level.

Enemy

Add the following features to the Enemy prototype:

  • Enemies no longer need their damage property. They will instead base their damage on the Character.attackTotal() method. re-write the tests to account for this.

  • Enemies should have an experienceReward property. If this is not set at construction, it should be 100 by default.

  • Enemies should not be able to attack if they are dead. Add a guard clause to prevent this.

Player

Add the following features to the Player prototype:

  • Players should have a levelUp method that increases their level by one.

  • Players should have a nextLevel proprty at creation, this should be 1000 by default.

  • Players should have a currentExperience property that is set to 0 at creation.

  • Players should now calculate the damage dealt to targets as attackTotal + weapon.damage.

  • Change the Player.attack(target) method so that a killing blow will add the target's experienceReward to the Player.currentExperience.

  • After a killing blow and experience reward, Players should check if their currentExperience is equal to or greater than their nextLevel property. If so, the levelUp() method should be called, and a new nextLevel target that is 10% larger should be set.

git-quest's People

Contributors

ian-antking avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.