Build Your Own Guess the Number Game

Project Description

The "Guess the Number Game" project aims to create an interactive web-based game where players attempt to guess a randomly generated number within a specified range. The game will provide real-time feedback on whether guesses are too high, too low, or correct, enhancing user engagement and enjoyment. The application will have a simple, intuitive interface, making it accessible to players of all ages.

Objectives

  • Provide an engaging and fun gameplay experience for users.

  • Allow users to start a new game and specify the range of numbers.

  • Provide feedback on user guesses (too high, too low, or correct).

  • Keep track of the number of attempts taken to guess the correct number.

  • Enable users to reset the game easily after completing a round.

Functional Requirements User Management

  • Start New Game: Users can start a new game and define the range of numbers (e.g., 1- 100).

  • Submit Guess: Users can submit a guess and receive feedback. Game Logic

  • Generate Random Number: The game will randomly generate a number within the specified range.

  • Feedback Mechanism: Provide feedback to the user based on their guess:

    • Too High

    • Too Low

    • Correct Guess

  •  Attempt Count: Keep track of the number of attempts made by the user.

Game Reset

  • Reset Game: Users can reset the game to play again without refreshing the page.

Non-Functional Requirements

  • Usability: The game interface should be intuitive and user-friendly, suitable for all age groups.

  • Performance: The game should provide instant feedback with minimal latency.

  • Accessibility: The game should be accessible to users with disabilities, following web
    accessibility standards (WCAG).

  • Cross-Browser Compatibility: The game should work seamlessly across all major browsers.

Use Cases 

  • Start a New Game: User initiates a new game by defining a range.

  • Submit a Guess: User submits a guess and receives feedback.

  • Reset Game: User resets the game to start over.

User Stories

  • As a user, I want to start a new game so that I can begin guessing.

  • As a user, I want to submit my guess and receive immediate feedback.

  • As a user, I want to know how many attempts I made to guess the correct number.

  • As a user, I want to reset the game easily to play again.

Technical Requirements

  • Frontend: Use HTML, CSS, and JavaScript for the user interface.

  • Game Logic: Implement the random number generation and feedback mechanism using JavaScript.

  • Storage: Use local storage or session storage to track game state (e.g., number of attempts).

API Endpoints (if applicable)

  • GET /new-game: Initialize a new game with a specified range.

  • POST /submit-guess: Submit a guess and receive feedback.

Security

  • Ensure user input is sanitized to prevent injection attacks.

  • Implement HTTPS for secure communication.

Performance

Optimize the game to ensure quick responses and smooth user experience.

Documentation

  • Provide user documentation outlining how to play the game.

  • Include developer documentation for future enhancements.

Glossary

  • Guessing Game: A game where players attempt to guess a hidden number based on feedback.

  • Range: The minimum and maximum numbers within which the random number is generated.

Appendix

Include mockups of the user interface and any additional notes related to gameplay mechanics.

Join our community

Need to show-off or ask doubts? Join our Slack Community. Ask questions, help others and learn in public to make the best use of MBProject. Search and join the "project-builders" channel.

Recent Attempts

Be the first to build this project

Ready? Start Building

Includes the necessary PRD, assets, design and frontend files, style guide and a README file to help you with each step of the project.

Start Building

Tags

Easy

2 Tasks

Coding

Python

Want Your Certificate?

Complete all the tasks in the project to claim your certificate