Coder Social home page Coder Social logo

dino-kennel's People

Contributors

chris-calhoun avatar

Watchers

 avatar

dino-kennel's Issues

Refactor Code to handle button events appropriately

User Story

Previously, the dino cards handled every click inside of the card, not just the buttons. I refactored the code to handle only button clicks.

Acceptance Criteria

WHEN the user clicks on a dino card
BUT not on a button
NOTHING should happen.

Dependencies

N/A

Dev Notes

get rid of handling button clicks on id #dinoLocation.

Dino Modal

User Story

When the user clicks on a dino card, a modal will be opened with various information about the dinosaur.

Acceptance Criteria

WHEN the user clicks a dino card
THEN a modal will be displayed
THAT shows the dinos name, age, owner, health, and history of actions.

Dependencies

#13

Dev Notes

  • display modal on click
  • list dinos name, owner, health
  • list dinos adventures

Dino delete function

User Story

If the Dino moves to another kennel or gets adopted, there should be the ability to delete the dinosaur from the page.

Acceptance Criteria

WHEN the user adds a new dinosaur
THEN the dinosaur should appear on a card
WITH a delete button
THAT allows the user to delete the dinosaur card when clicked

Dependencies

#4

Dev Notes

  • add delete button to dinosaur card
  • add function to delete dinosaur when button is clicked.

Move dino to kennel, graveyard, or hospital

User Story

Based on the dinosaurs health status, it should be located in the appropriate area.

Acceptance Criteria

When the dinos health is 70 or above
THEN the dino should appear in the kennel.
WHEN the dinos health is less than 70
THEN the dino should be moved to the hospital
WHEN the dinos health is less than 40
Then the dino should be moved to the graveyard.

Dependencies

#7

Dev Notes

  • move the dino to the appropriate area based on its health

Form Validation

Provide form validation requirements for the add dinosaur form.

User Story

When the user submits a form, if certain fields are empty, the form will not submit until the user fills them. Fields that are required should have a identifying feature.

Acceptance Criteria

WHEN the user submits their form
IF certain fields are empty
THEN the user will be notified to fill those fields.

Dependencies

#3

Dev Notes

  • Fields that have are empty (on submit) must be identified
  • once identified, a notification must be brought to the attention of the user.

Change health bar color based on health

User Story

Based on the dinosaurs health status, it should be located in the appropriate area.

Acceptance Criteria

When the dinos health is 70 or above
THEN the health bar should be green
WHEN the dinos health is less than 70
THEN the health bar should be yellow.
WHEN the dinos health is less than 40
THEN the health bar should be red.

Dependencies

#7 #8

Dev Notes

  • change health bar color based on health.

Create form to add Dino's

User Story

The user should see a add dino button upon arriving at the website. When the user clicks the add dino button, a form should appear with name, owner, age, image, and type fields. There should also be a submit button at the bottom of the form.

Acceptance Criteria

WHEN the user visits the page
THEN the user should see an "Add Dino" button
WHEN the user clicks the "Add Dino" button
THEN a form should appear with name, owner, age, image, type fields
AND a submit button

Dependencies

#1 #2

Dev Notes

  • add button that brings up form to add dino
  • create form with name, owner, age, image, type fields
  • add submit button to form.

Create hospital and graveyard areas

User Story

Below the kennel, the user should see the hospital and the graveyard.

Acceptance Criteria

WHEN the user visits the page
THEN the user should see a hospital area
AND a graveyard area.

Dependencies

#1 #2

Dev Notes

Create a designated area for the hospital and graveyard.

Actions on dinosaur

User Story

The user should have the ability to feed, pet, or take the dinosaur on an adventure. These action can either affect the dinosaur's health positively or negatively.

Acceptance Criteria

WHEN the user adds a new dinosaur
THEN a card should appear with buttons to a) feed b) pet and c) take the dino on an adventure
IF the user clicks feed
THEN the dino should have their health increased by 25
IF the user clicks pet
THEN the dino should have their health increased by 10
IF the user clicks on adventure
THEN the dino should have their health decreased by 30.

Dependencies

#4 #3

Dev Notes

  • create button for each action
  • increase/decrease dino health based on button clicked.

Add dino to kennel when submit "add dino" form

User Story

After the user clicks the submit button on the "add dino" form, the new dinosaur should show up on a card in an area designated as the Kennel.

Acceptance Criteria

WHEN the user clicks the submit button on the "add dino" form
THEN a dino card with the previously inputted info should appear
IN an area designated as the "Kennel"

Dependencies

#3

Dev Notes

  • dinosaur info should be stored in an array of objects.
  • all dinosaurs should have a "health" key with a value of 100 added into their object.
  • display new dino on click of submit button. Create module "dinoCard.js"
  • Create Kennel area for newly added dino card

Create Health Bar for Dino

User Story

When the user performs an action with the dinosaur, they should see a health bar that changes based on which action was performed.

Acceptance Criteria

WHEN the user clicked on the feed button
THEN the health bar should add 25 to the previous value
WHEN the user clicked on the pet button
THEN the health bar should add 10 to the previous value
WHEN the user clicked on the adventure button
THEN the health bar should subtract 30 from the previous value.

Dependencies

#4 #7

Dev Notes

  • create a health bar in each dino's card
  • based on the current health of the dino, the health bar should display that accordingly
    ex. 50 health should show a health bar that is 50% full.

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.