One-player treasure hunt game. Selects a random location for buried treasure, compares it with the player's click coordinates on the map, and gives them clues as to how close they are using JavaScript, jQuery, HTML5, CSS3, Twitter Bootstrap.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets
README.md
Thumbs.db
composer.json
favicon.ico
index.html
index.php

README.md

Pirate Treasure

Pirate Treasure

GAME RULES:

  • There is pirate treasure buried SOMEWHERE in this vicinity. Guess where it is, and click on that area of the map.
  • You will receive a clue as to how hot, warm, or cold you are.
  • Keep clicking on the map as you zero in on the treasure's location.
  • When you find the treasure, be sure drop me a line and thank me for helping you find it.

TECHNOLOGY:

  • JavaScript.
  • jQuery.
  • HTML5.
  • CSS3.
  • Twitter Bootstrap.

NEW CODING SKILLS LEARNED:

  • Employing Pythagorean Theorem in JavaScript.
  • Using "offset" of click events.
  • Math.abs to convert a number to an absolute. (Although I later removed it because it turned out not to be necessary.)

FUTURE ITERATIONS:

  • Store the user's last click in a variable and give them a hint as to whether their new click is "closer" or "farther" by comparison.
  • Add a dot to the screen for each click event, color-coded according to heat value.
  • Add a big red "X" when the treasure is clicked.