As a user, I should see a leveler of up to 100 and two buttons that say healthy and unhealthy in the top lefthand corner. When each button is clicked, the correct amount should be added to the leveler: add ten for healthy and subtract three for unhealthy.
AC
WHEN the page loads
THEN a private variable should be full at 100 called fullAND there should be two buttons: healthy and unhealthyAND when clicked, the healthy button should add ten to the private variable
AND the unhealthy button should subtract three.
Dev Notes
Create a new file in components folder called eat.js
Create a private variable called full that is set to 100 on page load
Set the full variable to decrease by twelve on a timer -- every twenty seconds
Write function called eatActionBuilder that prints two buttons to the DOM -- you will need to import the printToDom for this
The first button healthy should add ten to the private variable
The second button unhealthy should subtract three from the private variable
User Story
As a user, I should see a leveler of up to 100 and two buttons that say
healthy
andunhealthy
in the top lefthand corner. When each button is clicked, the correct amount should be added to the leveler: add ten for healthy and subtract three for unhealthy.AC
WHEN the page loads THEN a private variable should be full at 100 called
full
AND there should be two buttons:healthy
andunhealthy
AND when clicked, the healthy button should add ten to the private variable AND the unhealthy button should subtract three.Dev Notes
eat.js
full
that is set to 100 on page loadfull
variable to decrease by twelve on a timer -- every twenty secondseatActionBuilder
that prints two buttons to the DOM -- you will need to import theprintToDom
for thishealthy
should add ten to the private variableunhealthy
should subtract three from the private variable