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
- 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.
- Input a Number: Enter a guess between 0 and 9 using the number input field or the increment/decrement buttons.
- Make a Guess: Click the "Make a Guess" button to submit your guess.
- 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.
- Advance to Next Round: Click "Next Round" to play another round and see who can get the highest score.
- Reset the Game: Click "Reset Game" to start over from round 1 and reset the scores.
- HTML5 for structure.
- CSS3 for styling.
- JavaScript for game logic and interactivity.
To run this game locally, follow these steps:
- Clone the repository:
git clone https://github.com/rizkyngrh23/guess-the-number.git
- Navigate to the project directory:
cd guess-the-number-game
- Open the game in your browser:
Make sure you download the css and js too!
open guess_number.html # On macOS start guess_number.html # On Windows xdg-open guess_number.html # On Linux
You can play the game online at Guess the Number!.