Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pratikpaudel/ggweb


https://github.com/pratikpaudel/ggweb

Last synced: 30 days ago
JSON representation

Awesome Lists containing this project

README

        

# Guess My Number!

A simple web game built with HTML, CSS, and JavaScript where you have to guess a randomly generated number between 1 and 20.

## Gameplay
1. Enter a number between 1 and 20 in the input field.
2. Click the "Check!" button to see if your guess is correct.
3. The game will provide feedback on whether your guess is too high or too low.
4. Click the "Play again!" button to reset the game and try again.

## How to Run the Game
You can play the game directly on the [Guess My Number!](https://pratikpaudel.github.io/guessing-number-game/index.html) website.

To run the game locally:
1. Clone the repository:
```sh
git clone https://github.com/PratikPaudel/ggweb
```
2. Open `index.html` in your web browser.

## Code Overview

### HTML
The HTML file sets up the structure of the game interface, including headers, input fields, buttons, and sections for displaying messages and scores.

### CSS
The CSS file (`styles.css`) is used to style the game, including layout, colors, and fonts.

### JavaScript
The JavaScript file (`script.js`) contains the game logic, including:
- Generating a random number.
- Handling user input and button clicks.
- Providing feedback messages.
- Updating scores and highscores.
- Changing the background color based on game events.

## Contributing
If you'd like to contribute to the project, please fork the repository and use a feature branch. Pull requests are welcome.

## License
This project is licensed under the MIT License.