Skip to content

Guess the Number! is a simple game where players compete against a computer by guessing a randomly generated number between 0 and 9. The game features score tracking, multiple rounds, and a user-friendly interface.

License

Notifications You must be signed in to change notification settings

rizkyngrh23/guess-the-number

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 

Repository files navigation

Guess the Number!

Guess the Number! is a simple interactive game where a player competes against a computer by guessing a randomly generated number between 0 and 9. The game includes score tracking, round advancement, and a night mode (Soon!) for a better user experience in different lighting environments.

Preview

guess-the-number-preview

Features

  • Player vs Computer: Guess a number and see if you're closer to the randomly generated target number than the computer.
  • Rounds and Scoring: Track your score over multiple rounds.
  • Responsive UI: Buttons for incrementing and decrementing the guess value, and an intuitive interface for gameplay.
  • Night Mode: Toggle night mode to switch between light and dark themes for easier viewing. (SOON)
  • Reset and Restart: Ability to reset the game or start a new round at any time.

How to Play

  1. Input a Number: Enter a guess between 0 and 9 using the number input field or the increment/decrement buttons.
  2. Make a Guess: Click the "Make a Guess" button to submit your guess.
  3. Compare: The game will compare your guess with the computer's and determine the winner based on how close each guess is to the target number.
  4. Advance to Next Round: Click "Next Round" to play another round and see who can get the highest score.
  5. Reset the Game: Click "Reset Game" to start over from round 1 and reset the scores.

Language Used

  • HTML5 for structure.
  • CSS3 for styling.
  • JavaScript for game logic and interactivity.

How to Use

To run this game locally, follow these steps:

  1. Clone the repository:
    git clone https://github.com/rizkyngrh23/guess-the-number.git
  2. Navigate to the project directory:
    cd guess-the-number-game
  3. Open the game in your browser:
    open guess_number.html   # On macOS
    start guess_number.html  # On Windows
    xdg-open guess_number.html  # On Linux
    Make sure you download the css and js too!

Play the Game!

You can play the game online at Guess the Number!.

About

Guess the Number! is a simple game where players compete against a computer by guessing a randomly generated number between 0 and 9. The game features score tracking, multiple rounds, and a user-friendly interface.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published