Use the included boilerplate as a starting point to complete the challenge below.
- Create a page that generates a random number of haystacks (3-12) on the page.
- One of the haystacks should be randomly selected to "hide" a needle.
- During the game the user has "X" number of guesses to locate the hidden needle by clicking on haystacks.
- Clicked haystacks should be "squashed", and not selectable again for future guesses
- When the haystack hiding the needle is clicked it should change to the needle image
- Each valid guess should decrease the remaining guesses for the user
- Winning Condition: User finds the needle before running out of guesses
- Lossing Condition: User does NOT find the needle before using all of their guesses
- Animate the haystacks
on.hover
on.click
- Track WINS / LOSSES while on the page
- Display a "splash" before/after the game
- Provide buttons to: begin game, end game, and reset game