Skip to content

Boilerplate for a "Needle in a Haystack" programming challenge using jQuery

License

Notifications You must be signed in to change notification settings

byronferguson/NeedleInAHaystack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Byron Ferguson
Feb 11, 2018
08e77fc · Feb 11, 2018

History

7 Commits
Feb 10, 2018
Feb 10, 2018
Feb 9, 2018
Feb 11, 2018

Repository files navigation

Needle in a Haystack

Working Example

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

Extra Challenge Ideas

  • 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

About

Boilerplate for a "Needle in a Haystack" programming challenge using jQuery

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published