Skip to content

A simple Random Number Guessing Game using HTML, CSS, and JavaScript to practice DOM manipulation and interactive web development.

Notifications You must be signed in to change notification settings

anandku06/04_numberGuessing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Random Number Guessing Game

About the Project

This is a simple Random Number Guessing Game built using HTML, CSS, and JavaScript. The primary focus of this project is to practice DOM manipulation skills and enhance understanding of core web development concepts.

Features

  • A randomly generated secret number.
  • Input field for users to guess the number.
  • Feedback messages to indicate whether the guess is too high, too low, or correct.
  • A score counter to track the user's attempts.
  • A reset button to restart the game.

Learning Objectives

  • Practicing DOM manipulation using JavaScript.
  • Styling the user interface with CSS.
  • Handling user inputs and events dynamically.
  • Developing interactive features using vanilla JavaScript.

Built With

  • HTML5: Structure of the web page.
  • CSS3: Styling for the game interface.
  • JavaScript (ES6): Game logic and DOM manipulation.

Getting Started

Prerequisites

To view or modify this project, you only need a web browser and a text editor.

Installation

  1. Clone this repository:
    git clone https://github.com/anandku06/random-number-guessing.git
  2. Navigate to the project directory:
    cd random-number-guessing
  3. Open the index.html file in your browser:
    open index.html

How to Play

  1. The computer generates a secret number between a predefined range (e.g., 1 to 100).
  2. Enter your guess in the input field and press the "Guess" button.
  3. The game will provide feedback:
    • "Too High" if your guess is higher than the secret number.
    • "Too Low" if your guess is lower than the secret number.
    • "Correct!" if you guess the number.
  4. Use the "Reset" button to play again.

Project Files

  • index.html: Contains the structure of the game.
  • style.css: Defines the styling of the game interface.
  • script.js: Contains the game logic and DOM manipulation.

Future Enhancements

  • Add difficulty levels (easy, medium, hard) with varying number ranges.
  • Add a timer to challenge the user.
  • Display a leaderboard for high scores.

Acknowledgments

This project was created as a part of my practice to improve DOM manipulation and basic JavaScript skills. Feel free to use, modify, and learn from this project.

About

A simple Random Number Guessing Game using HTML, CSS, and JavaScript to practice DOM manipulation and interactive web development.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published