Skip to content

A fun web-based game where players try to guess a secret number between 1 and 10. The game provides hints and tracks attempts. Built with HTML, CSS, and JavaScript, it features a responsive design and offers the option to restart the game once the correct number is guessed.

License

Notifications You must be signed in to change notification settings

petersonchiquetto/SecretNumGame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎯 SecretNumGame

Welcome to SecretNumGame! An interactive game where you try to guess a secret number between 1 and 10! 🎲
This project combines learning and fun, utilizing HTML, CSS, and JavaScript to demonstrate essential web development concepts.


🌐 Application Architecture

The SecretNumGame follows a simple yet effective architecture, highlighting key web development principles.

Structure:

  • 🏗️ HTML: Defines the basic structure of the interface, such as buttons and messages.
  • 🎨 CSS: Ensures a stylish and responsive design.
  • 🛠️ JavaScript: Manages game logic, random number generation, and user interactivity.

Main Components:

  • 🔄 Dynamic Interactivity: DOM manipulation to update messages and attempt counters in real-time.
  • 🎲 Random Number Generator: Ensures a unique number for each round.
  • 🔃 Game Reset: Allows you to start a new round with a single click.

💡 Features

  • 🎯 Number Guessing: Try to guess the secret number between 1 and 10.
  • 🕵️‍♂️ Hint System: Get feedback if the secret number is higher or lower.
  • 📊 Attempt Tracker: See how many tries it took to guess correctly.
  • 🔄 Quick Reset: Restart the game with one click.
  • 🎤 Text-to-Speech: Hints are narrated using the ResponsiveVoice.js library.

🚀 How to Play

  1. 🎲 Choose a number between 1 and 10 in the input field.
  2. 🖱️ Click "Guess" to submit your attempt.
  3. 🔍 Get hints like "The secret number is higher" or "The secret number is lower."
  4. 🏆 Keep trying until you guess the number.
  5. 🔄 Click "New Game" to restart.

📂 Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/SecretNumGame.git
    
  2. Navigate to the project directory:

    cd SecretNumGame
    
  3. Open the index.html file in your browser to start playing!


📖 Documentation

Code Structure:

  • 🏗️ HTML (index.html): Basic game structure.
  • 🎨 CSS (style.css): Modern, responsive styling.
  • 🛠️ JavaScript (app.js): Handles logic, random number generation, and interactivity.

Advanced Features:

  • 🎲 Random Generation: Each round starts with a new secret number.
  • 🔄 Dynamic Reset: All variables and interface elements are reset for a new game.
  • 📋 Lists: Arrays are used to prevent repeated numbers.

🤝 Contributing

Want to improve this project? Follow these steps to contribute:

  1. 🍴 Fork the repository.
  2. 🛠️ Create a branch for your feature:
    git checkout -b my-new-feature
    
  3. ✍️ Commit your changes:
    git commit -m "Add new feature"
    
  4. 📤 Push to the remote repository:
    git push origin my-new-feature
    

License

This project is licensed under the MIT License.


🎉 Have fun playing SecretNumGame and challenge your friends!


How to Customize:

  1. Replace the placeholder links with real images from your project.
  2. Add screenshots or GIFs to demonstrate the gameplay.
  3. Use a custom logo or banner image at the top of the README.

About

A fun web-based game where players try to guess a secret number between 1 and 10. The game provides hints and tracks attempts. Built with HTML, CSS, and JavaScript, it features a responsive design and offers the option to restart the game once the correct number is guessed.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published