Dots & Boxes
Software Requirements Specification
Release 1.0
26 March 2001
Author: Donna Stidolph
Revision History
|
Date |
Author |
Change Description Summary |
Affected Paragraphs |
|
3/26 |
Stidolph |
Release V 1.0 |
N/A |
|
|
|||
|
|
|||
|
|
|||
|
|
Dots & Boxes Software Requirements Specification
Table of Contents
1 Introduction
*1.1 Purpose
*1.2 Scope
*1.3 Definitions, Acronyms and Abbeviations
*1.4 References
*1.5 Overview of Effort
*2 Overall Description
*2.1 Product Perspective
*2.1.1 Concept of Operations
*2.1.2 User Interface Concepts
*2.1.3 Hardware Interfaces
*2.1.4 Software Interfaces
*2.1.5 Communications Interfaces
*2.1.6 Memory Constraints
*2.1.7 Operations
*2.1.8 Site Adaptation Requirements
*2.2 Product Functions
*2.2.1 Initialize Use Case
*2.2.2 Select Line Use Case
*2.2.3 Win Game Use Case
*2.2.4 Help Use Case
*2.2.5 Quit Game Use Case
*2.2.6 Restart Game Use Case
*2.3 User Characteristics
*2.3.1 Favored Users
*2.3.2 Ignored Users
*2.3.3 Disfavored Users
*2.3.4 User Inclusion Strategy
*2.4 Constraints
*2.5 Assumptions and Dependencies
*2.6 Apportioning of Requirements
*3 Specific Requirements
*3.1 External Interface Requirements
*3.1.1 User Interface
*3.1.2 Hardware Interfaces
*3.1.3 Software Interfaces
*3.1.4 Communication Interfaces
*3.2 Specific Requirements
*3.2.1 Sequence Diagrams
*3.2.2 Classes for Classification of Requirements
*3.2.GB GameBoard
*3.2.GB 1 Dot Grid [Defining]
*3.2.GB 4 Restart Control [Defining]
*3.2.GB 5 Help Control [Defining]
*3.2.GB 6 Help Control Modality [Defining]
*3.2.GB 7 Quit Control [Defining]
*3.2.GB 8 Pass Control [Defining]
*3.2.GB 9 Score Boxes Initialization [Defining]
*3.2.GB 9a Score Box Identification [Distinguishing]
*3.2.GB 10 Scoring [Defining]
*3.2.GB 11 Player Selection [Defining]
*3.2.GB 12 Winning [Defining]
*3.2.GB 12a Winning [Distinguishing]
*3.2.Line Attributes
*3.2.Line 1 Detection of Event [Defining]
*3.2.Line 2 Error Processing [Distinguishing]
*3.2.Line 3 Color [Defining]
*3.2.Line 4 Size [Defining]
*3.2.Box Attributes
*3.2.Box 1 Appearance Trigger [Defining]
*3.2.Box 2 Color [Defining]
*3.2.Box 3 Size [Defining]
*3.3 Performance Requirements
*3.3.1 Usability
*3.3.2 Load Time
*3.3.3 Processing Time
*3.4 Design Constraints/Decisions
*3.5 Software System Attributes
*3.5.1 Reliability
*3.5.2 Availability
*3.5.3 Security
*3.5.4 Maintainability
*Dots & Boxes Software Requirements Specification
Table of Figures
Figure 1-1 - Definitions, Abbreviations and Acronyms
*Figure 2-1 - Dots & Boxes State Transition Diagram
*Figure 3-1 - Initialization Sequence Diagram
*Figure 3-2 - Restart, Quit, Help Sequence Diagram
*Figure 3-3 - Line Select Sequence Diagrams
*Figure 3-4 - Invalid Line Selection Sequence Diagram
*Figure 3-5 - Win Game Sequence Diagram
*
Dots & Boxes Software Requirements Specification
PurposeThis document provides all the requirements for the Dots & Boxes computer game. Parts 1 and 2 primarily describe the behavior of the game from the user's perspective. Part 3 allocates the required behaviors to software requirements.
This document covers the requirements for release 1.0 of Dots & Boxes. Throughout the document, requirements will be identified as defining and distinguishing. The purpose of this is to guide designers in developing an architecture that can accommodate planned enhancements.
|
Term |
Definition |
|
Defining requirement |
A requirement describing a behavior of the application such that if the behavior is absent, the problem is not solved. In Dots & Boxes, the baseline consists of defining requirements only. |
|
Distinguishing requirement |
A requirement that offers additional functionality that sets this particular implementation apart from other possible implementations. |
|
Dot |
Denotes an intersection point on an 8 x 8 grid of dots and lines. |
|
Boxes |
Denotes "ownership" of a box formed by connecting dots. |
|
N/A |
Not Applicable |
|
TBD |
To Be Determined - decision that must be made eventually, but hasn't been made yet. |
|
TBS |
To Be Supplied - Missing item that hasn't been created yet, but will eventually be included. |
|
OBE |
Overcome By Events - no longer applicable due to some technical or programmatic action. |
|
SRS |
Software Requirements Specification |
|
o/s |
Operating system |
Figure -1 - Definitions, Abbreviations and Acronyms
Dots & Boxes User Manual, version 1.0 - TBS.
Dots & Boxes Navigation Diagrams, version 1.0 - TBS
This program will be written in Java 2, version 1.3. Its primary target platform will be a Windows machine, running NT or Windows 95, 98 or ME. It will act as rule interpreter for the game of Dots and Boxes , for 2 people. The user interface will be point and click on graphical objects representing the dots. The boxes will be constructed of lines between the dots, and the "owner" of the lines and boxes will be indicated by color. Minimal help will be provided, in the form of a short description of the game, available via a pull down menu.
Dots & Boxes is a paper and pencil game that we propose to migrate to a computer form. Given a square or rectangular array of dots, two players take turns joining two adjacent dots with a horizontal or vertical line. When such a move adds the fourth side of a box, the player who did the deed claims the box (marking it with his or her initial) and must take an extra turn. If the same move closes two boxes, the player claims both boxes but still gets only one bonus move. A player who can complete a box is not obliged to do so. The game ends when all the boxes are taken. The player who closed more boxes wins.
We propose to develop a computer-based version of the game, which will support two humans playing each other. There is no intent to immediately implement a computer opponent in the game, since the strategy can be quite involved.
Dots and Boxes is currently in vogue among mathematician's and game theorists - a book about Dots and Boxes strategy was not only published this year, it was reviewed in Scientific American
Dots and Boxes is most frequently used as a "time passing" game, but has been used by scientists and economists in strategic gaming and algorithmic development. Our implementation will automate the board creation and scoring process. The design of the game is intended to support expansion to include a computer opponent, to automate testing of various gaming strategies.
See Figure 2.1, Dots and Boxes State Transition Diagram, and Dots & Boxes Navigation Diagrams - TBS.

Figure -1 - Dots & Boxes State Transition Diagram
Dots & Boxes can be in one of the following states:
Game Board Set Up: The Game Board is being set up by the player. At this point, there are no player options, although planned enhancements include size of the grid, choice of colors and input of player names for scoring.
Waiting: The game is waiting for an input from the player. Possible inputs are "Quit", "Restart", "Help", or a line selection.
Line Processing: The game processes a line selection for validity and, if valid, to show correct player "ownership". If the line is valid, Box Detection & Processing is invoked. If the line is invalid, Input Error is invoked.
Box Detection and Processing: As each valid line is placed, the game looks to see if any boxes have been created by the addition of the line. If one or more boxes were created, the display is updated to show them, and Scoring is invoked. If all the boxes on the grid are filled, a "Game Over!, Player X wins" message is displayed. If no boxes are found, Player Selection is invoked.
Scoring: If new boxes are detected, the current player's score is incremented one point for each box created. After the score is updated, the new score is displayed and Player Selection is invoked.
Player Selection: Alternates line selection between two players.
Input Error: Displays error message, waits for operator acknowledgement.
Help: Displays game rules and computer game use directions. Help can stay active while other events are also active.
Quit: Causes orderly shut down of game.
Restart: Scores are returned to zero, all selected lines and boxes are cleared from the game board.
Pass: Passes the turn to the next player.
The appearance of the game board will have an appearance similar to that shown in Figure 2.2. See Dots & Boxes Navigation Diagram (TBS). All interaction with the user will be through use of a mouse. The game board will be initialized with a grid consisting of dots and lines. Players will click the mouse on lines to select them. "Ownership" of the selected lines and any boxes that result from the line selection will be shown by color, with different colors for unselected, Player 1 and Player 2.
The computer must have a mouse.
Dots & Boxes must run under the Windows NT and Solaris operating systems.
None. No networked extension of Dots & Boxes is envisioned.
TBD
None identified.
None identified at this point, although due to the requirement to run under two operating systems, there may be o/s specific activities required.
Actor: Player
Actor: Player
Actor: Player
Actor: Player
Actor: Player
Actor: Player
Favored users are those users for whom the game was developed. Favored users are those users who
The needs of the following user communities have not been and will not be considered in setting the requirements for Dots & Boxes:
Disfavored users are those who may use Dots & Boxes to gain inappropriate or illegal access to a computer system. No action is currently being taken to discourage disfavored users.
The users will be included by limited interaction, that is, we will ask representatives from the favored user group to periodically run our game. While they are using the game, we will watch their behavior to notice things that appear to be unclear or incorrect. At the end of the game session, we will ask for their comments on the game.
Dots & Boxes must run on both the Sun and Windows machines in Baskin 105 and 213. Operating system and hardware details TBD.
All work; analysis, design and implementation; must be accomplished by end of quarter.
None identified.
The requirements described in Sections 1 and 2 of this SRS are referred to as "C" requirements; those in section 3 are referred to as "D" requirements. The primary audience for the C requirements is the customer (Linda Werner) and primary audience for the D requirements is the developer. The C and D requirements are intended to be consistent, and inconsistencies that are noted are defects. If a conflict arises between C and D requirements, C requirement will take precedence since they are ones that have formed the basis of customer understanding.
Requirements are designated as "defining" or "distinguishing" in Section 3. All defining requirements will be implemented in release 1. As many distinguishing requirements will be implemented as time allows. However, the architectural design will include all requirements, both defining and distinguishing to promote ease of future extensability.
See Dots & Boxes User Manual and Dots & Boxes Navigation Diagrams. TBS
Interface is through a mouse.
Dots & Boxes must operate under both Window NT and Solaris operating systems. Details TBS.
None.
The following classes will be used for partitioning requirements:
The requirements allocated to each of the classes are described in detail in the following paragraphs.
The GameBoard manages the entire game. The lines are the active elements that players select to form the squares and score points. The boxes are the result of line selection.
The GameBoard "holds" the entire game: the dot grid on which the game is played, the controls, the score boxes, the lines that connect the dot grid and the boxes that are created when four lines form a box. There is only one GameBoard for the game.
3.2.GB Attributes
The GameBoard shall have the following attributes:
The GameBoard shall display on start up a grid of dots. The default value will be 8 x 8.
GB 1a Dot Grid [Distinguishing]
At initiation, the GameBoard shall query the user for a square grid size and create a grid based on the player input.
3.2.GB 2 Dot Image [Distinguishing]
The dots will be inactive graphical objects contained in a gif file called "dot.gif". The image used for representation of the dots can be changed by changing the contents of the dot.gif file.
3.2.GB 3 GameBoard Initial State [Defining]
On initialization, the GameBoard shall display the following:
See User Manual for sample display.
3.2.GB 4 Restart Control [Defining]
On initialization, the GameBoard will display a Restart control. The Restart control can be activated at any time. Invoking the Restart control will have the following effects:
3.2.GB 5 Help Control [Defining]
On initialization, the GameBoard will display a Help control. The Help control can be activated at any time. Invoking the Help control will cause the display of a text display containing the rules of the game and effect of the Dots & Boxes controls on the state of the game.
3.2.GB 6 Help Control Modality [Defining]
The Help narrative will continue to be displayed until a player closes the display. Game play can continue in the presence of the Help narrative.
3.2.GB 7 Quit Control [Defining]
On initialization, the GameBoard will display a Quit control. The Quit control can be activated at any time. Invoking the Quit control will cause a confirmation control to be displayed. If a player uses the confirmation control to reaffirm the decision to quit the game, the game will shut down.
3.2.GB 8 Pass Control [Defining]
On initialization, the GameBoard will display a Pass control. The Pass control can be activated at any time. Invoking the Pass control will cause the turn to be passed to the other player.
3.2.GB 9 Score Boxes Initialization [Defining]
On initialization, the GameBoard will display two score boxes, one for each player. The score boxes will be labeled with the player number. The player number will appear in the same color used to indicate that player's select lines on the game grid. The score boxes will initially be set to zero for both players.
3.2.GB 9a Score Box Identification [Distinguishing]
If player id has been implemented, the score boxes will be labeled with the initial, in the color used for that player's lines.
When a box is detected, the score for the player whose turn it is will be incremented.
3.2.GB 11 Player Selection [Defining]
When a line selection does not result in a box, the GameBoard will change the active player status so that the next line will be selected by the other player.
When a line selection results in a box, the GameBoard will not change the active player status.
When a player invokes the Pass control, active player status will change to the other player.
The game will continue until all the squares in the grid are filled. The GameBoard will detect this condition and display an end of game message in the status area and identify the winner of the game.
3.2.GB 12a Winning [Distinguishing]
If player identifications are known, the end of game message will identify the winner by initial.
3.2.GB 13 Status Display [Distinguishing]
The status display can display one of three messages:
Each instance of a Line object will have the following attributes:
3.2.Line 1 Detection of Event [Defining]
Lines will be capable of detecting a mouse click. If a mouse is clicked on an un-selected line, the event will cause the line to turn the color corresponding to the player whose turn it is currently.
If a mouse is clicked on an already selected line (a line previously selected by the other player), the event will cause an error message to be displayed.
3.2.Line 2 Error Processing [Distinguishing]
If line selection processing results in an error message, the GameBoard will be notified. The only error condition identified is a player attempting to select an already selected line.
Lines will be capable of coloring themselves in three colors. One color will represent lines that are unselected. At initialization or after restart, all lines will be this color. The second color will indicate that the line was selected by Player 1. The third color will indicate that the line was selected by Player 2. The colors are TBD.
Line size will be TBD x TBD
Each instance of a Box object will have the following attributes:
3.2.Box 1 Appearance Trigger [Defining]
Boxes will become visible to the players after all four lines surrounding a grid area have been selected by the same player.
Boxes will be capable of coloring themselves in two colors. One color will indicate that the box was made by Player 1. The second color will indicate that the box was made by Player 2. The colors will be the same as the colors selected for the Lines.
Box size will be TBD x TBD.
Dots & Boxes will be easy to use. This will be demonstrated by having a first-time user who meets the Favored User description play the game to completion, or until he/she elects to quit, with no interventions by the game developers, only use of the on-line help facility. The game will be initialized when the user begins the interaction.
Dots & Boxes will take less than one minute to load and display the initialized game board, both at game initialization and restart.
Dots & Boxes will take less than 30 seconds to process any operator input. The worst case for this is believed to be the case in which line selection results in a box completion and a game completion.
Because of the requirements to run under multiple operating systems and because of the graphical nature of the game, Dots & Boxes will be programmed in Java and run as a Java application. Because the decision has been made to use Java, implementation details that might be deferred to design time have been incorporated into the requirements, i.e. use of JButtons for controls, selection of active components, etc.
Dots & Boxes shall not fail in such a fashion as to require a restart (definition of "restart" is machine and o/s dependent) in three iterations of the System Test Procedure (TBS).
Dots & Boxes is designed to run as the only active application. The game is not required to shut down other applications on initialization, but Dots & Boxes' behavior is not guaranteed when running with other applications active.
Not applicable
The Dots & Boxes design goal is that addition of a computer opponent will be possible.