As a user, I should see a leveler of set to 100 and two buttons that say Run Away and Commit Violence in the bottom lefthand corner. When each button is clicked, the correct amount should be added to the leveler: add one for running away and subtract ten for committing violence.
AC
WHEN the page loads
THEN a private variable should be set to 100 called strengthAND there should be two buttons: Run Away and Commit ViolenceAND when clicked, the running away button should add one to the private variable
AND the committing violence button should subtract ten.
Dev Notes
Create a new file in components folder called fight.js
Create a private variable called strength that is set to 100 on page load
Set the strength variable to decrease by four on a timer -- every fifteen seconds
Write function called fightActionBuilder that prints two buttons to the DOM -- you will need to import the printToDom for this
The first button Run Away should add one to the private variable
The second button Commit Violence should subtract ten from the private variable
The strength score should NEVER be larger than 100.
User Story
As a user, I should see a leveler of set to 100 and two buttons that say
Run Away
andCommit Violence
in the bottom lefthand corner. When each button is clicked, the correct amount should be added to the leveler: add one for running away and subtract ten for committing violence.AC
WHEN the page loads THEN a private variable should be set to 100 called
strength
AND there should be two buttons:Run Away
andCommit Violence
AND when clicked, the running away button should add one to the private variable AND the committing violence button should subtract ten.Dev Notes
fight.js
strength
that is set to 100 on page loadstrength
variable to decrease by four on a timer -- every fifteen secondsfightActionBuilder
that prints two buttons to the DOM -- you will need to import the printToDom for thisRun Away
should add one to the private variableCommit Violence
should subtract ten from the private variable