Q headache, Version 1.0
Softw are R equirem ents Specification 
draft A
Septem ber 29, 2003
Jean­Philippe BrossatIndex
1 Introduction......................................................................................................................3
1.1 Purpose.....................................................................................................................3
1.2 Scope........................................................................................................................3
1.3 Definitions, Acronym s, and Abbreviations..............................................................3
1.4 References................................................................................................................3
1.5 SR S Docum ent Overview ........................................................................................4
2 GEN ER A L DESC R IPTIO N ............................................................................................4
2.1 Product Perspective..................................................................................................4
2.1.1 User Interfaces .................................................................................................4
2.1.2 Hardw are Interfaces .........................................................................................4
2.1.3 Softw are Interfaces...........................................................................................4
2.1.4 Com m unications Interfaces..............................................................................4
2.1.5 Mem ory Constraints.........................................................................................4
2.1.6 Site Adaptation Requirem ents..........................................................................4
2.2 Product Functions.....................................................................................................5
2.2.1 Undo et Redo Actions......................................................................................5
2.2.2 Tim e passed to play..........................................................................................5
2.2.3 Count of action number....................................................................................5
2.2.4 Score.................................................................................................................5
2.2.5 Score window s..................................................................................................5
2.3 User Characteristics..................................................................................................5
2.4 Start Up Requirem ents.............................................................................................5
2.5 Apportioning of Requirem ents.................................................................................5
3 SPEC IFIC REQ U IR EM EN TS........................................................................................5
3.1 External Interfaces....................................................................................................5
3.1.1 User Interfaces..................................................................................................6
3.1.1.1  Introduction..............................................................................................6
3.1.1.2 Main window ............................................................................................6
3.1.2 Softw are Interfaces...........................................................................................6
3.1.3  C om m unications Interfaces.............................................................................6
3.2 Functional Requirem ents.........................................................................................6
3.2.1 Actions..............................................................................................................6
3.2.1.1 Presentation of the board..........................................................................6
3.2.1.2 Block selection..........................................................................................7
3.2.1.3 Block deselection......................................................................................7
3.2.1.4 Block movem ent.......................................................................................7
3.2.1.5 Undo Action..............................................................................................8
3.2.1.6 Redo Action..............................................................................................8
3.2.2 End of the gam e managem ent..........................................................................9
3.2.2.1 End of the gam e .......................................................................................9
3.2.2.2 Finish W indow s with Statistics................................................................93.2.2.3 Sim ple Finish W indow s..........................................................................10
3.2.3 Statistics M anagem ent....................................................................................10
3.2.3.1 Player Statistics managem ent.................................................................10
3.2.3.2 Gam e Statistics managem ent..................................................................10
3.2.3.3 Statistics erasing.....................................................................................11
3.2.3.4 Statistic W indow .....................................................................................11
3.2.4 File managem ent............................................................................................12
3.2.4.1 Open gam e..............................................................................................12
3.2.4.2 Save gam e...............................................................................................12
3.2.4.3 Save gam e as...........................................................................................13
3.2.4.4 Exit..........................................................................................................13
3.2.5 Menu bar.........................................................................................................14
3.2.5.1 Gam e menu.............................................................................................14
3.2.5.2 Action menu............................................................................................14
3.2.5.3 Statisctis menu........................................................................................15
3.2.5.4 Help menu...............................................................................................15
3.3 Perform ance Requirem ents....................................................................................15
3.4 Softw are System Attributes....................................................................................15
1Introduction
1.1Purpose
This specifications establishes the requirements for the product named
Qheadache. The intended audience is the analyst, programmer and tester of
Qheadache.
1.2Scope
The product is a computerized game that displays an interface used to solve a
specific headache.
1.3D efinitions, A cronym s, and A bbreviations
Not applicable.
1.4R eferences
Not applicable.1.5SR S D ocum ent O verview
The remaining sections of this document provide a general description, including
characteristics of the users of this project, the product's hardware, and the
functional and data requirements of the product. General description of the
project is discussed in section 2 of this document. Section 2 gives the functional
requirements, data requirements and constraints and assumptions made while
designing the game. It also gives the user viewpoint of product use. Section 3
gives the specific requirements of the product. Section 3.0 also discusses the
external interface requirements and gives detailed description of functional
requirements.
2G EN ER A L D ESC R IPTIO N
2.1Product Perspective
2.1.1U ser Interfaces 
The product runs as a stand­alone application.
Its user interface uses menus, graphics and sounds.
2.1.2H ardw are Interfaces 
The product requires the use of a keyboard and a mouse to interface with the
user. It requires a graphical display of at least 800*600 resolution.
2.1.3Softw are Interfaces
The product uses the Qt graphical library. It must run with all the operating
systems that Qt supports.
2.1.4C om m unications Interfaces
Not applicable.
2.1.5M em ory C onstraints
Not applicable.
2.1.6Site A daptation R equirem ents
Not applicable.2.2Product F unctions
2.2.1U ndo et R edo A ctions.
The user must undo and redo its last thousand actions.
2.2.2T im e passed to play.
The product must count and display the time that the user uses to play.
2.2.3C ount of action num ber.
The product must count and display the number of the user's action.
2.2.4Score.
The product must record the score (time and number of counts) of a play
associated with the name of a user.
2.2.5Score w indow .
The product must display a window with all the player's scores.
2.3U ser C haracteristics
No qualification is necessary.
2.4Start U p R equirem ents
Not applicable.
2.5A pportioning of R equirem ents
Not applicable.
3SPEC IFIC R EQ U IR EM EN TS
3.1E xternal Interfaces
The product generally requires a mouse and a keyboard for input. Other pointing
and input devices are allowable, provided they provide similar functions to a
mouse and keyboard, namely the ability to move a cursor onscreen to select
buttons and the ability to type names. 
The product uses menus, graphics and sounds. The hardware and operatingsystem must provide an 800x600 screen resolution. Sound is not required to play
the game.
3.1.1U ser Interfaces
3.1.1.1 Introduction
The users consist of anyone who wants to play a simple game 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. 
3.1.1.2M ain window
The main window shall provide the following parts : 
– A board, see chapter 3.2.1.1.
– a menu bar, see chapter 3.2.5.
3.1.2Softw are Interfaces
Not applicable.
3.1.3 C om m unications Interfaces
Not applicable.
3.2F unctional R equirem ents
3.2.1A ctions.
3.2.1.1Presentation of the board.
The board is a rectangular zone where the user could move some blocks. Let x be
the mesure unit. The height of the board game is 5x, its width is 4x : x can't be
less than 50 pixels and greater than 100 pixels. The blocks are separated by a
marge of 0.1x.
There are four square blocks with a side of x.
There are four rectangular blocks with the following dimensions : a height of 2x
and a width of x.
There is one block with the following dimensions : a height of x and a width of2x.
There is one square block with a side of 2x.
The board is black and the blocks are yellow.
3.2.1.2B lock selection
3.2.1.2.1D escription
See above chapter 3.2.1.1.
3.2.1.2.2Input
Left­clicked down on a block.
3.2.1.2.3Processing
The game state becomes "Block deplacement".
3.2.1.2.4O utput
None.
3.2.1.3B lock deselection
3.2.1.3.1D escription
See above chapter 3.2.1.1.
3.2.1.3.2Input
Left­clicked up on a selected block.
3.2.1.3.3Processing
The game state becomes "Block selection".
3.2.1.3.4O utput
None.
3.2.1.4B lock movem ent
3.2.1.4.1D escription
See above chapter 3.2.1.1.
3.2.1.4.2Input
Mouse movement during the "Block movement" state. 3.2.1.4.3Processing
The selected block follows the mouse movement without overlapp the other
blocks and exit of the game zone. The selected block can't move near other blocks
at least 0.05x from the others blocks.
3.2.1.4.4O utput
None.
3.2.1.5U ndo Action
3.2.1.5.1D escritption
The user can cancel a movement. 
3.2.1.5.2Input
Menu selection.
3.2.1.5.3Processing
The game displays the block positions at the places where they were before the
last movement. This action is consider like a movement. The "undo" action is
unvailable if there was no previous movement.
3.2.1.5.4O utput
New game board display.
3.2.1.6R edo Action
3.2.1.6.1D escritption
The user can redo a movement that has been canceled.
3.2.1.6.2Input
Menu selection.
3.2.1.6.3Processing
The game displays the block positions at the places where they were before the
last movement was canceled. This action is consider like a movement. The redo
action is unvailable, if the previous action wasn't an "undo" action.
3.2.1.6.4O utput
New game board display.3.2.2E nd of the gam e m anagem ent
3.2.2.1E nd of the game 
3.2.2.1.1D escription
How the user finishs the game.
3.2.2.1.2Input
The great square is moved at the bottom of the board.
3.2.2.1.3Processing
All the player statistics are freezed.
3.2.2.1.4O utputs
If the number of block movements of the current player is lower than the highest
number of block movement recorded in the statistic file, the The "Finish Window
with Statistcs" is displayed, see chapter 3.2.2.2. If not the "Simple finish Window"
is displayed, see chapter 3.2.2.3.
3.2.2.2F inish W indow with Statistics.
3.2.2.2.1D escription
The Finish Window with Statisctis contains a the following text : "You win ! Enter
your name : ", an Edit Box that can contain 20 characters and a pushbutton with
the label "OK".
3.2.2.2.2Input
The games is over, see chapter 3.2.2.1.
3.2.2.2.3Processing
The player clicks on the pushbutton "OK". The player statistics are recorded in the
statistic file of the software, according to the requirement of the chapter 3.2.3.2.
3.2.2.2.4O utputs
The "finish" window is closed. The statistic window is displayed, see chapter
3.2.3.4.3.2.2.3Sim ple Finish W indow
3.2.2.3.1D escription
The Simple Finish Window contains a the following text : "You win !" and a
pushbutton with the label "OK".
3.2.2.3.2Input
The games is over, see chapter 3.2.2.1.
3.2.2.3.3Processing
The player clicks on the pushbutton "OK".
3.2.2.3.4O utputs
The Simple Finish Window is closed. The statistic window is displayed, see
chapter 3.2.3.4.
3.2.3Statistics M anagem ent.
3.2.3.1Player Statistics managem ent
3.2.3.1.1D esciption
The following statistics are recorded during the game :
– number of block movements since the start.
– time since the start.
3.2.3.1.2Input
A block movement.
3.2.3.1.3Processing
The number of block movement in incremented of 1. The difference of time of the
block movement and the previous recorded time is recorded.
3.2.3.1.4O utput
None.
3.2.3.2G am e Statistics managem ent
3.2.3.2.1D esciption
The game statistics is composed of 10 player statistics.3.2.3.2.2Input
The Finish Window with Statistics is completed by the player, see chapter 3.2.2.2.
3.2.3.2.3Processing
The statistics of the player (its name, the block movement number, the time
passed to solve the headache) is recorded in the statistic file. If 10 player statistics
are already recorded, the player statistics of the file with the greatest number of
block movements is erased.
3.2.3.2.4O utput
If the file was correctly updated, there is no ouput. If not, like wrong pemissions
or disk full, an error message is displayed.
3.2.3.3Statistics erasing
3.2.3.3.1D escritption
The user could erase all the statistics.
3.2.3.3.2Input
Menu selection.
3.2.3.3.3Processing
The data stored in the statistic file are erased.
3.2.3.3.4O utput
If the file was correctly updated, there is no ouput. If not, like wrong pemissions
or disk full, an error message is displayed.
3.2.3.4Statistic W indow .
3.2.3.4.1D escritption
The Player Statistics Window is composed of a listbox of 10 lines. Each line is
composed of the name of a player, the number of block movement, the time used
by the player to solve the headache. 
This statistcs are read from the statistic file of the game.
3.2.3.4.2Input
End of the game (see chapter 3.2.2.1) or menu selection.3.2.3.4.3Processing
Window display.
3.2.3.4.4O utput
None.
3.2.4File m anagem ent
3.2.4.1O pen game
3.2.4.1.1D escription
Open a previous saved game.
3.2.4.1.2Input
Menu selection.
3.2.4.1.3Processing
A dialog box is open : the user could choose a file that contains all the data of the
game previously saved.
3.2.4.1.4O uput
The board game is re­draw according to the file data. The player statistics are set
to the player statistics of the file data.
3.2.4.2Save game
3.2.4.2.1D escription
Save the current game.
3.2.4.2.2Input
Menu selection.
3.2.4.2.3Processing
If the game was never saved, the processing is identiqual to the action "Save as...".
If not, the following internal data are saved into the previous file that was used to
to save the the game : the current positions of the blocks, their last 10000
previous positions, the number of the previous movements and the time passed by
the user to solve the headache.3.2.4.2.4O uput
None.
3.2.4.3Save game as
3.2.4.3.1D escription
Save the current game.
3.2.4.3.2Input
Menu selection.
3.2.4.3.3Processing
A dialog box is open : the user could choose a file that will contain all the data of
the current game. Next, the following internal data are saved into the file : the
current positions of the blocks, their previous positions, the number of the
previous movements and the time passed by the user to solve the headache.
3.2.4.3.4O uput
None.
3.2.4.4E xit
3.2.4.4.1D escription
Stop the game
3.2.4.4.2Input
Menu selection.
3.2.4.4.3Processing
If the game is not saved, a dialog box is displayed that asks to the player if he
wants to save the game. Two choices are possible : "Yes" and "No". If "Yes" is
selected, the action "Save" is processed and the main window disappeared. If "No"
is selected, the main window disappeared.
3.2.4.4.4O uput
None.3.2.5M enu bar
3.2.5.1G am e menu
3.2.5.1.1D escription
Contains "Open game ...", "Save Game ...", "Save Game As..." and "Exit". In this
order. 
3.2.5.1.2Input
Menu selection. 
3.2.5.1.3Processing
Action in question is performed :
– "Open game ..." ­> action "Open game", see chapter 3.2.4.1.
– "Save Game ..." ­> action "Save Game", see chapter 3.2.4.2.
– "Save Game As ..." ­> action "Save game as", see chapter 3.2.4.3.
– "Exit" ­> action "Exit", see chapter 3.2.4.4.
3.2.5.1.4O utput
Menu disappears. Requirements of the action determines the continuation. 
3.2.5.2A ction menu
3.2.5.2.1D escription
Contains "Undo" and "Redo". In this order. The menu selection is unvailable if the
associated action is unvailable.
3.2.5.2.2Inputs
Menu selection. 
3.2.5.2.3Processing
Action in question is performed :
– "Undo" ­> action "Undo", see chapter 3.2.1.5.
– "Redo" ­> action "Redo", see chapter 3.2.1.6.
3.2.5.2.4O utputs
Menu disappears. Requirements of the action determines the continuation. 3.2.5.3Statisctis menu
3.2.5.3.1D escription
Contains "Display" and "Erase". In this order. 
3.2.5.3.2Inputs
Menu selection. 
3.2.5.3.3Processing
Action in question is performed :
– "Display" ­> displays the statistic window, see chapter 3.2.3.4.
– "Erase" ­> erase the statistics, see chapter 3.2.3.3.
3.2.5.3.4O utputs
Menu disappears. Requirements of the action determines the continuation. 
3.2.5.4H elp menu
3.2.5.4.1D escription
Contains "About". 
3.2.5.4.2Inputs
Menu selection. 
3.2.5.4.3Processing
"About Window" is displayed. The "About Windows" is composed of the following
text "Qheadache 1.0 by Jean­Philippe Brossat jp_brossat@yahoo.fr"
3.2.5.4.4O utputs
Menu disappears. Requirements of the action determines the continuation.
3.3Perform ance R equirem ents
There can be only one user per machine.
3.4Softw are System A ttributes
The software must be portable to the Windows OS.