0% found this document useful (0 votes)
10 views3 pages

Number Guessing Game SRS

The Software Requirements Specification outlines the Number Guessing Game, a console-based application in C++ where users guess a randomly generated number between 1 and 100 within 10 attempts. The game includes features like score tracking, hints, and a user-friendly interface, while being limited to Windows OS. Additional requirements include the ability to restart games, reset high scores, and save user statistics across sessions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views3 pages

Number Guessing Game SRS

The Software Requirements Specification outlines the Number Guessing Game, a console-based application in C++ where users guess a randomly generated number between 1 and 100 within 10 attempts. The game includes features like score tracking, hints, and a user-friendly interface, while being limited to Windows OS. Additional requirements include the ability to restart games, reset high scores, and save user statistics across sessions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Software Requirements Specification

(SRS)
Project Title: Number Guessing Game

Prepared by: Burhan Ullah, Burhan, Tamour, Talha

Date: May 5, 2025

1. Introduction

1.1 Scope
The Number Guessing Game is a console-based application built using C++. The system
generates a random number between 1 and 100 and allows users 10 attempts to guess it.
Feedback and hints are provided to guide the player. Scores are calculated based on
attempts and high scores are stored persistently.

1.2 Objectives
- Create an interactive and user-friendly guessing game.
- Track and persist user performance (high scores).
- Enhance engagement through color-coded feedback and hints.

2. Overall Description

2.1 Product Perspective


This standalone console game runs on Windows, utilizing Windows API features for console
manipulation (e.g., colored text). It does not depend on external systems or internet
connectivity.

2.2 Product Functions


- Prompt for user name.
- Display a main menu with options:
- Start New Game
- Show Current and High Scores
- Show Instructions
- Exit
- Random number generation (1–100).
- Provide proximity-based hints.
- Score calculation.
- High score persistence using file I/O.
- Console text color manipulation to indicate status (errors, success, etc.).

2.3 User Characteristics


- Basic understanding of using a console.
- Ability to input numeric data and navigate menu options.

2.4 Constraints
- Windows OS only (due to dependency on Windows.h).
- Console interface only.
- Input restricted to numerical values between 1 and 100.

2.5 Assumptions and Dependencies


- Windows console environment with support for Windows.h.
- File system access for reading/writing high scores.

3. Specific Requirements

3.1 Functional Requirements


FR1.1: The game must generate a random number between 1 and 100.

FR1.2: The user is allowed 10 attempts per game round.

FR1.3: After each guess, provide feedback whether the guess is too high or too low.

FR1.4: Provide proximity hints (e.g., “very close”, “close”, “far”).

FR1.5: Display the final score at the end of each game.

FR1.6: Persistently store the high score in a file (highscore.txt).

FR1.7: Update the high score file if the player's score exceeds the current high score.

FR1.8: Validate all numerical inputs to be within the 1–100 range.

FR1.9: Validate all menu inputs to ensure they fall within a valid range (0–3).

FR1.10: Use console text colors to indicate different message types (e.g., red for errors,
green for success).

FR1.11: Provide a clear instructions menu.

FR1.12: Inform the player of the correct number if all 10 attempts are used.

3.2 Manipulation Features (Added Requirements)


MR1.1: Allow players to restart the game after a round without returning to the main menu.
MR1.2: Provide an option to reset the high score manually.

MR1.3: Display motivational or humorous messages based on performance (e.g., “So close!”
or “Better luck next time!”).

MR1.4: Enable saving user stats across sessions (e.g., total games played, win/loss ratio).

MR1.5: Introduce difficulty levels that adjust the number of attempts or hint frequency.

4. Other Requirements
- Logging (Optional): Track player inputs and outcomes for analytics or debugging.
- Testing: Ensure proper random number generation, scoring accuracy, and UI feedback.
- Accessibility: Use clear text formatting and contrast to support users with visual
limitations.

You might also like