This project is a simple timer challenge game built with React. It allows users to start a timer and attempt to stop it before time runs out. The project includes a TimerChallenge component that handles the game logic and displays the results in a modal once the time expires.
- Timer Start/Stop: Users can start and stop the timer.
- Result Modal: Displays a modal with the result (win/lose) when the timer expires.
- Customizable Timer: The timer duration can be set via props.
├── public
│ ├── index.html
| ├── src
│ ├── components
│ │ ├── Player.js
│ │ ├── ResultModal.js
│ │ └── TimerChallenge.js
│ ├── App.js
│ ├── index.css
│ └── index.js
├── .gitignore
├── package-lock.json
├── package.json
└── README.md
TimerChallenge.js: The main game component where the timer starts and stops. It also triggers theResultModalwhen the time is up.ResultModal.js: Displays the result of the timer challenge.Player.js: (Assumed) Additional component which might be used to manage player details or actions.
This file ties everything together and includes the main game logic for rendering the TimerChallenge component.
The entry point of the application, where the React application is rendered into the DOM.
Make sure you have Node.js installed.
-
Clone the repository:
git clone https://github.com/nihar004/timer-challenge-game.git
-
Navigate to the project directory:
cd timer-challenge-game -
Install dependencies:
npm install
To start the app locally:
npm startThis will open the app in your default browser at http://localhost:3000.
To run the tests:
npm testTo deploy this project, you can use services like Vercel, Netlify, or GitHub Pages.
Contributions are welcome! Please open an issue or submit a pull request if you have any suggestions or improvements.
This project is licensed under the MIT License.
