Steal as many crystals as you can without arousing suspicion. Is the pirate's life for you? 💎💀
This project is mainly contained in simple object
, containing all game variables
and methods
. Random numbers are generated with for loops
and if-else statements
and user input is collected with on-click functions
.
-
- Under the title, piratey game instructions will appear. A piece of parchment below will give some friendly game instructions. The target value, current haul, user scores, and the crystals will display beneath the parchment.
-
Select crystals to increase your current haul to match the target value.
- Each crystal is worth a different value and clicking each crystal will increase your current haul by its value.
-
Win or lose.
- If you successfully increase your current haul exactly to the target value, you'll earn a win! The message on the parchment will congratulate you on your victory.
- If your current haul exceeds the target value, you'll incur a loss. The message on the parchment will invite you to try again.
-
Play again!
- After either a win or a loss, your current haul will clear and each crystal will be assigned a new value, allowing you to keep playing as long as you'd like.
If you have any questions about this super clever and advanced project, visit my portfolio and send me a message.
This project is lovingly (and casually) maintained by me, @fkakatie. Thanks for checking it out.