You are on page 1of 4

== Crazy Eights Solitaire ==

== Software Requirements Specification ==


----
'''Executive Summary'''
Crazy Eights Solitaire is a computer-based version of the classic multi-player c
ard game of the same name. The human player competes against the computer to di
scard all the cards in their hand.[[BR]]
----
'''General Description'''
'''''Product Perspective'''''
The primary benefit of this program is that it allows someone to play a solitair
e game without requiring another person to participate. [[BR]]
'''''Product Features'''''
The application's purpose is to simulate the card game "Crazy Eights." The maj
or features are:
* Deal random hands of cards to all players.
* Manage the game play: alternating turns among players, responding to player's
moves, and updating the game board.
* Determining if the game is won or lost.
'''''User Characteristics'''''
Crazy Eights is designed for personal computer users who enjoy simple solitaire
card games. Crazy Eights is purely recreational software with little or no utili
tarian value. The user is assumed to be competent using a WIMP interface (window
s, icons, menus, pointers) to operate simple computer games such as Minesweeper
or Klondike Solitaire. The user is assumed to be familiar with the rules of Cra
zy Eights. [[BR]]
'''''Assumptions and dependencies'''''
Crazy Eights uses a standard 52-card deck. [[BR]] The application is not interna
tionalized; all menus and messages are in English.[[BR]] The application will ru
n on Windows 9x/XP/Vista and Linux platforms with the Java Runtime Environment 5
.0 installed.[[BR]] The application does not require an internet connection, oth
er than to download the application from the product website.[[BR]]
'''''General Constraints''''' [[BR]] none. [[BR]]
----
== Crazy Eights Functional Requirements ==
Overview[[BR]] Crazy Eights is a solitaire game based on a popular 2-4 player c
ard game. The game objective is to get rid of all the cards in hand as soon as p
ossible before the opponents do. Discarded cards must follow the suit or rank of
the face-up card. e.g. if the card is an Ace of Clubs, the player can play any
Ace or any Club. [[BR]] [[BR]] Playing the Game[[BR]] [[BR]]
1. At the start of a game the system deals each player 7 cards at random from th
e deck.[[BR]] 2. The remaining cards are placed face down and the top card is p
ut face up on the table to start the discard pile.[[BR]] 3. The human player ta
kes the first turn.[[BR]] 4. The system will indicate which cards in the player
's hand are legal moves.[[BR]] 5. During a turn the system requires a player to
discard a playable card if one exists. [[BR]] 6. If the hand has no playable ca
rds, the system requires the player to draw the top card from the stockpile.[[BR
]] 7. If the drawn card is playable it is placed in the player's hand, and the
player must then discard it.[[BR]] 8. If the drawn card is not playable, the pl
ayer continues to draw a card from the deck until either [[BR]] 9. the deck is
exhausted, in which case the system requires the player to pass, or [[BR]] 10.
a playable card is drawn.[[BR]] 11. When the player plays an Eight of any suit
the system requires the player to choose the suit for the opponent to follow on
the next turn.[[BR]] 12. When the player's turn is complete, the system will pe
rform a turn for the computer opponent.[[BR]] [[BR]] Ending the Game[[BR]] [[
BR]] 13. Whoever plays the last card in hand is the winner.[[BR]] 14. If both
players pass, the game is a draw.[[BR]] [[BR]] [[BR]]
== Crazy Eights Non-Functional Requirements ==
General Guidelines: Performance and reliability are not very important. Priorit
y should be given to adaptability, maintainability, and usability.
=== Operating Constraints ===
1. The program requires the JRE 5 from Sun Microsystems.
=== Platform constraints ===
1. The program requires a Pentium 4 or higher processor with 256 Megabytes of R
AM and 2 Megabytes of available hard drive space.
=== Modifiability ===
1. If it is desired to change the number of cards dealt in the initial hand, th
e developer will be able to make the required changes in < 1 person-hours.
1. If it is desired to create an alternate user interface, the developer should
be able to make the required change without altering any of the game logic comp
onents of the application.
1. If it is desired to use different card images, the developer should be able
to make the change with no modifications to the source code.
1. If it is desired to create a more sophisticated computer player, the develop
er should be able to make the required enhancement without altering the existing
architecture.
=== Documentation ===
1. The API for the public interfaces in the application will be documented as j
avadoc pages that conform to the class documentation standard.
1. A class diagram in UML notation will be provided.
1. The source code itself will be documented according to the class coding stan
dard.
1. There is no user manual provided.
=== Portability ===
1. The program will run on Win 95/98/XP/Vista, Fedora Core 9, and Ubuntu 8.10.
=== Reliability ===
1. Since the program is purely for recreation and involves no user data, reliab
ility is of low importance.
=== Security ===
1. The program will not access any user data files or programs.
1. The program will not alter or replace any system files.
=== Usability ===
The application will be judged sufficiently usable if:
1. A new user is able to play a complete game of Crazy Eights in less than ten
minutes.
1. A new user commits less than one error in use of the game (e.g. clicking on
a disabled card) every ten minutes.
1. A user who is familiar with the rules of Crazy Eights is able to correctly o
perate the program without any written documentation.
=== Testability ===
1. If the user provides a "-c" flag on the command line when starting the appli
cation, it will run in "console mode" without a GUI. Console mode provides a mi
nimal text user interface that can be used to exercise all the game features.
=== Deployment ===
1. The program is to be deployed as an executable JAR file. The user must be a
ble to download the JAR file, launch it, and the application should run with no
configuration required.
=== Performance ===
1. Desired Response Times (not critical) : At game start: less than five second
s until the board display appears.[[BR]] After each turn: less than one second.[
[BR]]
----
== Behavioral Requirements ==
[http://www.csc.calpoly.edu/%7Ejdalbey/SWE/CaseStudies/CrazyEights/UIPrototype U
I Prototype][[BR]]
----
== Informational Requirements ==
=== State Diagram ===
[http://www.csc.calpoly.edu/%7Ejdalbey/SWE/CaseStudies/CrazyEights/StateDiagram.
png State Diagram] [[BR]]

=== Data Dictionary ===


||card||description[[BR]]definition||a standard playing card[[BR]]suit + rank||
||deck||description[[BR]]definition||a standard set of 52 playing cards.[[BR]]{c
ard}^52^||
||discard||description[[BR]]definition||stack of cards that have been discarded
from players hands, the most recent card on top.[[BR]]{card}||
||draw game||description[[BR]]definition||when both players pass|| ||
||playable card||description[[BR]]definition[[BR]][[BR]][[BR]]||a card that is l
egal to play[[BR]]a) follows the suit of the card on the discard pile, or[[BR]]
b) follows the rank of the card on the discard pile, or[[BR]] c) is an Eight o
f any suit. (An eight may be played at any time).||
||player||description[[BR]]definition||a participant in the game[[BR]]human | co
mputer||
||rank||description[[BR]]definition||the rank of a card[[BR]]1-10|jack|queen|kin
g||
||suit||description[[BR]]definition||the suit of a card[[BR]]clubs|diamonds|spad
es|hearts||
||table||description[[BR]]definition||the playing area[[BR]]deck + {hand}^2^ + d
iscard||
||turn||description[[BR]]definition||A player's action in the game[[BR]]play|dra
w|pass||
||winner||description[[BR]]definition||the player that won the game by being fir
st to discard all their cards.[[BR]]player||
----
== Appendices ==
=== Glossary ===
UI:: acronym for User Interface
=== External Interfaces ===
None. [[BR]]
=== Engineering Analysis ===
''Platform Choice (O/S and Language)''
Java was chosen because the CSc dept. computer labs support both Windows and Lin
ux operating systems and students may want to deploy the application on differen
t platforms. Performance is not a big concern as the application is a simple ga
me without heavy computational demands, and the slower performance of Java is ac
ceptable to gain its portability advantages.
''Quality Attributes''
The nature of this application is a recreational solitaire card game. Thus it h
as no significant performance demands. Reliability is not crucial because there
is no critical data that will be lost if the application fails. Usability is a
much more important determinant of the success of the product. Also, priority
should be given to adaptability and maintainability as those will reduce develop
ment costs in the long term.
''Adaptability'' [[BR]] In the future it is quite likely that developers may wan
t to create a different user interface for the game. To simplify this task, the
user interface is separate from the game logic. Additionally, the interface to w
hich the UI design must conform is made public to allow third party developers t
o create their own front end to our game. Similarly, the computer player logic i
s separate from the rest of the game logic so that a more sophisticated computer
opponent could be created without altering the existing application architectur
e.
----

You might also like