Coder Social home page Coder Social logo

heroes-ratslab's Introduction

Heroes & Rats Lab

Tasks:

A. Create a constructor to create a Hero character

  • A Hero has a name
  • A Hero has health
  • A Hero has a favourite food
  • A Hero can talk saying their name
  • A Hero has a collection of tasks to complete

B. Create a constructor to create Task objects

  • A task has a difficulty level
  • A task has an urgency level
  • A task has a reward
  • A task should be able to be marked as completed

C. Create a constructor to create Food objects.

  • Food should have a name
  • Food should have a replenishment value

D. Extend your hero.

  • A hero should be able to eat food, and health should go up by the replenishment value
  • If the food is their favourite food, their health should go up by 1.5 * value.
  • A hero should be able to sort their tasks by difficulty, urgency or reward.
  • A hero should be able to view tasks that are marked as completed or incomplete.

Extension

  • Create a constructor to create Rat objects.
  • Rats should be able to touch food, if they do the food becomes poisonous.
  • Heroes that eat poisonous food should lose health.

Further

Be creative. Extend the game! Give the hero super powers.

Create a super-villain who wants to take over the world!

heroes-ratslab's People

Contributors

brycedev-test 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.