Skip to content

Timer Challenge Game is a simple and interactive React-based game where users test their reflexes by starting and stopping a timer. The goal is to stop the timer before it runs out. The game features a modal to display results and is easily customizable for different timer durations. Perfect for practicing quick decision-making and timing skills!

Notifications You must be signed in to change notification settings

nihar004/timer-challenge-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Timer Challenge Game

image

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.

Features

  • 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.

Project Structure

├── 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

Components

  • TimerChallenge.js: The main game component where the timer starts and stops. It also triggers the ResultModal when 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.

App.js

This file ties everything together and includes the main game logic for rendering the TimerChallenge component.

index.js

The entry point of the application, where the React application is rendered into the DOM.

Setup

Prerequisites

Make sure you have Node.js installed.

Installation

  1. Clone the repository:

    git clone https://github.com/nihar004/timer-challenge-game.git
  2. Navigate to the project directory:

    cd timer-challenge-game
  3. Install dependencies:

    npm install

Running the App

To start the app locally:

npm start

This will open the app in your default browser at http://localhost:3000.

Testing

To run the tests:

npm test

Deployment

To deploy this project, you can use services like Vercel, Netlify, or GitHub Pages.

Contributing

Contributions are welcome! Please open an issue or submit a pull request if you have any suggestions or improvements.

License

This project is licensed under the MIT License.


About

Timer Challenge Game is a simple and interactive React-based game where users test their reflexes by starting and stopping a timer. The goal is to stop the timer before it runs out. The game features a modal to display results and is easily customizable for different timer durations. Perfect for practicing quick decision-making and timing skills!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published