# 1 Introduction
[NULL]

## 1.1 Purpose
This specification establishes the requirements for the product named Qheadache. The intended audience includes the analyst, programmer, and tester of Qheadache.

## 1.2 Scope
The software product to be produced is named Qheadache. It is a computerized game designed to provide an interface for solving a specific puzzle or challenge, referred to as a "headache." The application of Qheadache is to offer an engaging and interactive gaming experience that challenges users to solve the puzzle through strategic movements and actions. The primary objective of the software is to entertain users while providing a platform for cognitive skill development. The game aims to be accessible to a wide range of users, from beginners as young as eight years old to advanced players, including adults. The benefits of Qheadache include enhancing problem-solving skills and providing a fun and challenging activity for users.

## 1.3 Product overview
[NULL]

### 1.3.1 Product perspective
The product, Qheadache, is a standalone computerized game that operates independently and does not form part of a larger system. It is designed to run on any operating system supported by the Qt graphical library, which it utilizes for its graphical interface.

#### System interfaces
[N/A]

#### User interfaces
The user interface of Qheadache is designed to be intuitive and user-friendly, utilizing menus, graphics, and sounds. It supports interaction through a keyboard and mouse, allowing users to navigate the game and perform actions such as selecting and moving blocks.

#### Hardware interfaces
Qheadache requires a graphical display with a minimum resolution of 800x600 pixels. It interfaces with standard input devices, specifically a keyboard and a mouse, but can also accommodate other pointing devices that provide similar functionality.

#### Software interfaces
Qheadache relies on the Qt graphical library for its user interface. It is compatible with all operating systems that support Qt, ensuring broad accessibility across different platforms.

#### Communications interfaces
[N/A]

#### Memory constraints
[N/A]

#### Operations
Qheadache operates in a user-initiated mode, where users interact with the game through a graphical interface. The game records user actions and statistics, such as the number of moves and time taken, which are displayed at the end of the game.

#### Site adaptation requirements
[N/A]

#### Interfaces with services
[N/A]

### 1.3.2 Product functions
The Qheadache game software provides several key functions to enhance user interaction and gameplay experience:

- **Undo and Redo Actions**: Users can undo and redo their last thousand actions, allowing for flexible gameplay adjustments.
- **Time Tracking**: The software tracks and displays the time spent by the user during gameplay.
- **Action Count**: It counts and displays the number of actions performed by the user.
- **Score Recording**: The game records the user's score, which includes time and action count, and associates it with the user's name.
- **Score Display**: A window is available to display all the player's scores, providing a comprehensive view of performance.
- **Game Board Interaction**: Users can interact with a game board to move blocks, with specific rules governing block selection, deselection, and movement.
- **Game End Management**: The game provides mechanisms to conclude the game, including displaying finish windows with or without statistics based on player performance.
- **Statistics Management**: The software manages player and game statistics, allowing for recording, displaying, and erasing of statistics.
- **File Management**: Users can open, save, and save games as new files, ensuring game progress is maintained.
- **Menu Navigation**: The game includes a menu bar with options for game management, actions, statistics, and help, facilitating easy navigation and operation.

These functions collectively ensure a comprehensive and engaging user experience, allowing players to interact with the game effectively while tracking their performance.

### 1.3.3 User characteristics
The intended users of the product are individuals who wish to play a simple computerized game. No specific qualifications are necessary, and the user base can range from beginners, starting at age 8, to advanced players, including adults. Users are expected to have basic computer operation skills, such as using a mouse and keyboard. There are no specific requirements regarding educational level, experience, or technical expertise.

### 1.3.4 Limitations
b) Hardware limitations: The product requires a graphical display of at least 800x600 resolution and the use of a keyboard and a mouse for user interaction.

c) Interfaces to other applications: The product uses the Qt graphical library and must run on all operating systems that Qt supports.

[N/A] for other limitations.

## 1.4 Definitions
[N/A]

# 2 References
[N/A]

# 3 Requirements
[NULL]

## 3.1 Functions
The Qheadache game software is designed to perform several key functions to facilitate gameplay and manage user interactions. These functions include:

- **Undo and Redo Actions**: The user can undo and redo their last thousand actions. This is achieved through menu selections, and each action is considered a movement. The "undo" action is unavailable if there was no previous movement, and the "redo" action is unavailable if the previous action wasn't an "undo" action.

- **Time Tracking**: The software counts and displays the time the user spends playing the game. This is part of the player statistics management, where the time since the start is recorded.

- **Action Counting**: The software counts and displays the number of actions performed by the user. Each block movement increments the count by one.

- **Score Recording**: The software records the score, which includes the time and number of actions, associated with the user's name. This is managed through the game statistics management, where up to 10 player statistics are recorded.

- **Score Display**: A window is displayed showing all the player's scores. This is part of the statistics management, where the player statistics window displays a list of up to 10 lines, each containing a player's name, number of block movements, and time used to solve the game.

- **Game Board Management**: The game board is a rectangular zone where users can move blocks. The board's dimensions and block sizes are defined, and blocks are separated by a margin. The board is black, and the blocks are yellow.

- **Block Selection and Movement**: Users can select blocks by left-clicking and move them by dragging the mouse. The selected block follows the mouse movement without overlapping other blocks or exiting the game zone. Blocks must maintain a minimum distance from each other.

- **End of Game Management**: The game ends when the great square is moved to the bottom of the board. Player statistics are frozen, and a finish window is displayed based on the player's performance.

- **Statistics Management**: The software manages player and game statistics, including recording, displaying, and erasing statistics. Player statistics include the number of block movements and time since the start.

- **File Management**: The software allows users to open, save, and save games as new files. It also provides an exit function, prompting users to save the game if it hasn't been saved.

- **Menu Bar Functions**: The menu bar includes options for game management, action management, statistics management, and help. Each menu selection performs the associated action, such as opening a game, saving a game, undoing an action, or displaying statistics.

The software does not specify validity checks on inputs, responses to abnormal situations, or the effect of parameters. The relationship of outputs to inputs is primarily managed through the user interface and game logic, with no specific formulas for input to output conversion detailed.

## 3.2 Performance requirements
There can be only one user per machine. [N/A]

## 3.3 Usability requirements
The Qheadache game is designed to be user-friendly and accessible to a wide range of users, including children as young as 8 years old and adults. No specific qualifications are necessary to use the software, ensuring that it is approachable for beginners and advanced players alike. The interface is intuitive, utilizing menus, graphics, and sounds to enhance the user experience. The game provides feedback through visual elements such as the main window, which includes a board and a menu bar, facilitating easy navigation and interaction. The software aims to deliver a satisfying user experience by allowing users to undo and redo actions, track their progress with time and action counts, and view their scores in a dedicated window. The game is designed to be efficient, with minimal memory constraints and compatibility with various operating systems supported by the Qt graphical library.

## 3.5 Logical database requirements
[N/A]

## 3.6 Design constraints
[N/A]

## 3.7 Software system attributes
e) Portability - The software must be portable to the Windows OS.

## 3.8 Supporting information
[N/A]

# 4 Verification
[NULL]

## 4.1 Functions
[N/A]

## 4.2 Performance requirements
The verification of performance requirements will focus on ensuring that the software supports only one user per machine, as specified. The verification approach will include:

- **Static Numerical Requirements Verification**: 
  - Confirm that the software is designed to support only one user per machine. This will be verified through testing scenarios where multiple user logins are attempted on a single machine to ensure that the software restricts access to a single user.

- **Dynamic Numerical Requirements Verification**:
  - Although no specific dynamic numerical requirements are provided, the software's performance will be monitored to ensure it operates efficiently under normal usage conditions. This includes verifying that the game responds promptly to user inputs and that all actions, such as undo and redo, are executed within an acceptable time frame.

The performance requirements will be validated through a series of tests designed to measure the software's response times and user capacity, ensuring compliance with the specified constraints. [N/A] for any additional dynamic numerical requirements not specified in the original SRS.

## 4.3 Usability requirements
[N/A]

## 4.5 Logical database requirements
[N/A]

## 4.6 Design constraints
[N/A]

## 4.7 Software system attributes
[N/A]

# 5 Appendices
[NULL]

## 5.1 Assumptions and dependencies
[N/A]

## 5.2 Acronyms and abbreviations
[N/A]
