# 1 Introduction

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

## 1.2 Scope
The product is a computerized game that displays an interface used to solve a specific headache.

## 1.3 Product overview

### 1.3.1 Product perspective
The product runs as a stand-alone application. It requires a keyboard and a mouse for user interaction and a graphical display of at least 800x600 resolution. The product uses the Qt graphical library and must run on all operating systems that Qt supports.

### 1.3.2 Product functions
The major functions of the product include:
- Undo and redo actions for the last thousand user actions.
- Counting and displaying the time spent playing.
- Counting and displaying the number of user actions.
- Recording and displaying player scores.
- Displaying a window with all player scores.

### 1.3.3 User characteristics
No specific qualifications are necessary for users. The game is suitable for anyone who knows how to operate a computer, with a beginning level player starting at age 8, up through an advanced level player who could be an adult.

### 1.3.4 Limitations
- The product requires a graphical display of at least 800x600 resolution.
- Sound is not required to play the game.
- There can be only one user per machine.

## 1.4 Definitions
[N/A]

# 2 References
[N/A]

# 3 Requirements

## 3.1 Functions
### 3.1.1 Actions
- **Undo and Redo Actions**: Users can undo and redo their last thousand actions.
- **Time Tracking**: The product must count and display the time that the user uses to play.
- **Action Count**: The product must count and display the number of the user's actions.
- **Score Management**: The product must record the score (time and number of actions) of a play associated with the name of a user and display a window with all the player's scores.

### 3.1.2 End of Game Management
- **End of Game**: The game ends when the great square is moved to the bottom of the board, freezing all player statistics.
- **Finish Window with Statistics**: Displays if the current player's block movements are lower than the highest recorded. It prompts the user to enter their name.
- **Simple Finish Window**: Displays if the current player's block movements are not lower than the highest recorded.

### 3.1.3 Statistics Management
- **Player Statistics**: Records the number of block movements and time since the start.
- **Game Statistics**: Composed of 10 player statistics, updating the file as necessary.
- **Statistics Erasing**: Users can erase all statistics.
- **Statistics Window**: Displays player statistics from the file.

### 3.1.4 File Management
- **Open Game**: Allows users to open a previously saved game.
- **Save Game**: Saves the current game state.
- **Save Game As**: Saves the current game state to a new file.
- **Exit**: Stops the game, prompting to save if unsaved.

### 3.1.5 Menu Bar
- **Game Menu**: Contains options for opening, saving, and exiting the game.
- **Action Menu**: Contains options for undoing and redoing actions.
- **Statistics Menu**: Contains options for displaying and erasing statistics.
- **Help Menu**: Contains an "About" option.

## 3.2 Performance requirements
There can be only one user per machine.

## 3.3 Usability requirements
[N/A]

## 3.5 Logical database requirements
[N/A]

## 3.6 Design constraints
[N/A]

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

## 3.8 Supporting information
[N/A]

# 4 Verification

## 4.1 Functions
[N/A]

## 4.2 Performance requirements
[N/A]

## 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

## 5.1 Assumptions and dependencies
[N/A]

## 5.2 Acronyms and abbreviations
[N/A]