Skip to content

learn-academy-2023-alpha/treasurehunt-challenge

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

78 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ’° React Treasure Hunt Game

As a developer, you are tasked with creating a treasure hunt game. The user will see a game board on the page and be able to select various squares on the board. Hidden behind one square is a treasure that will win the game and hidden behind another square is a bomb that will lose the game. All other squares will reveal a neutral image. The user will be given a particular number of clicks to find the treasure that will win the game.

πŸ€” Remember

  • Pseudocode!!
  • Ask clarifying questions

πŸ“š User Stories

  • As a user, I can see a page with a three by three grid board game with a question mark in each square.
  • As a user, when I click on one of the question marks an alert appears with the index position of that question mark in the array.
  • As a user, when I click on one of the question marks instead of the alert the question mark turns into a tree emoji.
  • As a user, if I select the winning square the question mark will become a treasure emoji and if I select the losing square the question mark will become a bomb emoji.
  • As a user, I can click on a β€œPlay Again” button that will restart the game.
  • As a user, I can see a counter that shows how many guesses I have left. The counter starts at five and decrements one every time I click on a square that is not the treasure nor the bomb.
  • As a user, I can see a message informing me that I won the game if I select the square that contains the treasure.
  • As a user, I can see a message informing me that I lost the game if I select the square that contains the bomb.
  • As a user, I cannot continue to play the game after I win or lose.
  • As a user, I can see a message informing me that I lost the game when I run out of turns (the counter reaches zero).

πŸ” Stretch Goals

  • Consider how to handle a situation where the bomb and the treasure are at the same index.

πŸ‘©β€πŸ’» Developer Stretch Goals

  • As a developer, I have a well commented application.
  • As a developer, I have well written README file with instructions on how to access my repository.
  • As a developer, my variables are all named semantically.
  • As a developer, I have refactored and efficient code.
  • As a developer, I have my application deployed as a live website.

About

The template repo for LEARN Academy's Treasure Hunt project in React

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 45.3%
  • JavaScript 42.9%
  • CSS 11.8%