Skip to content

This C++ program is a simple game where the player must input the correct sequence of characters within a time limit. The score is based on the number of correct inputs. The game ends if the player makes too many mistakes.

Notifications You must be signed in to change notification settings

venkatagopi-04/-static-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

-static-Game

Certainly! Below is a README file for your C++ game code:


Reaction Time Game

Description

This is a simple reaction time game written in C++. The game presents asterisks (*) appearing at random intervals, and the player needs to input the corresponding number within a time limit to score points. Failing to input the correct number within the time limit results in losing the game.

Features

  • Randomized sequence of asterisks to test reaction time.
  • Player input required to match asterisk appearance.
  • Score tracking and game over conditions.
  • Uses sleep function for timing (Note: dos.h and unistd.h are Unix-based headers; the latter may not be compatible with Windows).

How to Play

  1. Compile the reaction_time.cpp file using a C++ compiler.
  2. Run the compiled executable.
  3. Enter your name when prompted.
  4. Asterisks will appear randomly, and you need to input the corresponding number quickly.
  5. Score points for each correct input.
  6. Failing to input the correct number within the time limit ends the game.
  7. The final score is displayed at the end of the game.

Requirements

  • C++ compiler
  • Standard C++ libraries

Usage

  • Clone or download the repository.
  • Compile reaction_time.cpp using a C++ compiler.
  • Run the compiled executable.
  • Follow the on-screen instructions to play the game.

Note

  • The game uses platform-specific headers (dos.h, unistd.h) for timing. Ensure compatibility with your platform.
  • This is a simple console-based game intended for educational purposes.

Author


About

This C++ program is a simple game where the player must input the correct sequence of characters within a time limit. The score is based on the number of correct inputs. The game ends if the player makes too many mistakes.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages