Skip to content

Guess My Number is a fun and simple web-based game where players try to guess a randomly generated number between 1 and 20. This game keeps track of the score and allows players to reset the game when they wish to try again.

License

Notifications You must be signed in to change notification settings

Ahmad131554/guess-my-number

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Guess My Number Game

Guess My Number is a fun and simple web-based game where players try to guess a randomly generated number between 1 and 20. This game keeps track of the score and allows players to reset the game when they wish to try again.


Table of Contents

  1. Project Description
  2. Project Preview
  3. Features
  4. Technologies Used
  5. Installation Instructions
  6. Usage Instructions
  7. License

Project Description

This is a simple web-based Number Guessing Game that allows players to guess a randomly generated number between 1 and 20. The game offers features like score tracking, highscore recording, and game reset. It is built using HTML, CSS, and JavaScript, making it a great beginner-friendly project to practice these web technologies.


Project Preview

You can view a live demo of the project here: Guess My Number Demo


Features

  • Random Number Generation: The game generates a random number between 1 and 20 for the player to guess.
  • Score Tracking: The game starts with a score of 20 and decreases with each incorrect guess.
  • Highscore Tracking: Displays and updates the highscore whenever the player beats their previous best score.
  • Reset Feature: The player can restart the game at any time by clicking the "Again!" button.
  • Visual Feedback: The background color changes when the player guesses correctly, and feedback messages are shown for each guess (Too high, Too low, Correct).

Technologies Used

  • HTML: Provides the structure and content for the game.
  • CSS: Styles the game and makes it visually appealing.
  • JavaScript: Contains the logic for the game, such as generating random numbers, checking guesses, updating scores, and handling game resets.

Installation Instructions

  1. Clone this repository to your local machine using the following command:

    git clone https://github.com/yourusername/guess-my-number.git
  2. Navigate to the project folder

     cd guess-my-number
  3. Open the index.html file in your preferred browser to start playing the game.

You can open it locally by simply double-clicking the index.html file, or you can serve it using a simple local server.


Usage Instructions

  • Start the Game: Open the index.html file in any modern browser to begin playing the game.

  • Make a Guess: Enter a number between 1 and 20 in the input field and click the "Check!" button.

  • View Feedback: After each guess, you'll receive feedback about whether your guess is too high, too low, or correct.

  • Reset the Game: Click the "Again!" button to restart the game and try again with a fresh random number.


License

This project is licensed under the MIT License. See the LICENSE file for more information.

About

Guess My Number is a fun and simple web-based game where players try to guess a randomly generated number between 1 and 20. This game keeps track of the score and allows players to reset the game when they wish to try again.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published