Skip to content

codeplaygroundspace/guess-my-number-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Guess My Number Game

A simple interactive number guessing game built with vanilla JavaScript where players try to guess a randomly generated number between 1 and 20.

🎮 Game Features

  • Random number generation between 1-20
  • Score tracking system (starts at 20)
  • Highscore tracking
  • Interactive feedback ("Too high!" or "Too low!")
  • Visual feedback with color changes
  • Reset game functionality

🚀 How to Play

  1. Enter a number between 1 and 20 in the input field
  2. Click the "Check!" button to make a guess
  3. Follow the hints to guess the correct number
  4. Try to maintain the highest score possible
  5. Beat your highscore!

🛠️ Built With

  • HTML5
  • CSS3
  • JavaScript (ES6+)

📦 Installation

  1. Clone the repository:
git clone https://github.com/codeplaygroundspace/guess-my-number-js.git
  1. Open index.html in your preferred browser

🎯 Game Rules

  • Starting score is 20
  • Each wrong guess deducts 1 point
  • Game over when score reaches 0
  • Highscore is saved across game sessions
  • Use the "Again!" button to reset the game

🎨 Features

  • Responsive design
  • Dynamic UI updates
  • Score tracking
  • Highscore persistence
  • Input validation
  • Visual feedback for correct/incorrect guesses

🤝 Contributing

Feel free to fork this project and submit pull requests. You can also open issues for any bugs found or improvements suggested.

📝 License

This project is open source and available under the MIT License.

About

Vanilla JS Game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published