Back to JaMB Home
Section 1 Requirements Specification Document

 

JaMB

 

Preliminary

Design

Document

 

 

 

September 29th 2003

 

 

                    Courtney Arnold                                 Mable Flickinger

 

                    Brandon Toone                                 Susan Glaus
 

Table Of Contents

 

 

 I.   Preliminary Design Document

 A.                                                                     Structure Charts . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1

 B.         Data Dictionary . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2

 C.         Module Design . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3

 D.         Major Data Structures   . . . . . . . . . . . . . . . . . . . . 2.4

 


 

 

 

 

 

 

 

 

 

2.1 Structure Charts

     

     

 










2.2 Data Dictionary

 

Bonuses

·        Complete Trip of 700 Miles Bonus:  Bonus of 400 points when winner completes a trip of 700 miles.

o       = 400

·        Coupe Fourre Bonus:  Bonus of 300 points given to a player when a safety is played after a hazard card was placed.

o       = 300

·        Delayed Action Bonus:  Bonus of 300 points given to possessor if trip is completed and no more cards exist in the Draw Pile.

o       = 300

·        Extension Bonus: Bonus of 200 points to whichever player completes the extended length of 1,000 miles.

o       = 200

·        Safe Trip Bonus: Bonus of 300 points if winner completes a trip without playing any 200 mile card.

o       = 300

·        Shutting Out Bonus:  Bonus of 500 points after a completion of a 1000 mile trip and before opponent is able to play any Distance Card.

o       = 500

General

·        Battle Pile: Area where Hazard Cards and Remedy Cards are played.

o       = {0{Hazard Cards}18 | 0{Remedy Cards}38} |

{0{Hazard Cards}18 +0{Remedy Cards}38}

·        Digit:  A number value.

o       = {0|1|2|3|4|5|6|7|8|9}

·        Discard Pile: Area for cards already played.

o         = 0{Card}101

·        Draw Pile: Area containing all cards from which each player takes one per draw.

o         = 0{Card}101

·        Hand Pile: Cards in the player’s control.  No more than 5.

o         = 0{Card}5

·        Mile:  A unit of length between point A and point B, options are 25, 50, 75, 100,           200.

o       = {25|50|75|100|200}

·        Speed Pile: 2 piles (one for each player) where Speed Limit Cards and End of Limit Cards are placed.

o       =  {0{Speed Limit Card}4 | 0{End of Limit Card}6 } |

{0{Speed Limit Card}4 + 0{End of Limit Card}6 }

·        Trip: Distance traveled.

o         = 0{Digit}4

·         Completed Trip:  The definition of a complete trip is 700 miles or 1000 miles if an extension was called.

o       = {700 | 1000}

 

Distance

·        Distance Pile: Area to keep track of distance traveled. One per player (user/opponent).

o         = 0{Distance Cards}46

·        Distance Card: 46 cards representing a distance in miles.

o       = Card

Hazards

·        Hazard Card: 13 cards representing a road hazard occurred.  Used against opponent.

o       = Card

·        Accident Card: 2 Hazard Cards representing player incurred an accident.

o       = Card

·        Flat Tire Card: 2 Hazard Cards representing that the receiver has a flat tire and cannot continue to place Distance Cards.

o       = Card

·        Out of Gas Card: 2 Hazard Cards representing that the receiver is out of gas and cannot move until remedied.

o       = Card

·        Speed Limit Card:  3 Hazard Cards used to keep opponent from using a Distance Card greater than 50.

o       = Card

·        Stop Card: 4 Hazard Cards forcing to receiver to stop playing Distance Cards.

o       = Card

Remedies

·        Remedy Card: 38 cards used to recover from a Hazard Card played against possessor.

o       = Card

·        End of Limit Card:  6 Remedy Cards representing an end to a speed limit set by opponent.

o       = Card

·        Gasoline Card: 6 Remedy Cards representing possessor has gas.

o       = Card

·        Repair Card: 6 Remedy Cards used to counter an Accident Card.

o       = Card

·        Roll Card (Go): 14 Remedy Cards representing possessor can continue or begin laying down Distance Cards.

o       = Card

·        Spare Tire Card: 6 Remedy Cards used to remedy a Flat Tire Card previously played against possessor.

o       = Card

Safeties

·        Safety Area: Area where Safety Cards are played.

o         = 0{Safety Card}4

·        Safety Card: 4 cards used for prevention of future hazards.

o       = Card

·        Driving Ace: 1 Safety Card preventing a future Accident Card for the possessor.

o       = Card

·        Extra Tank Card: 1 Safety Card preventing a future Out of Gas Hazard for the possessor.

o       = Card

·        Puncture Proof Card:  1 Safety Card preventing a future Flat Tire Hazard for the possessor.

o       = Card

·        Right of Way Card:  1 Safety Card used to prevent future Speed Limit Cards being played against possessor.

o       = Card

 


2.3 Module Design

 

Title: Shuffle Deck

Module Id:  2.1.2.1

Purpose:  This module shuffles the deck of cards.

Method:  This module will call the shuffle method in the java.util collections class.

Usage:  New Game

External References:  None

Calling Sequence:  Deck – (O) Data structure representing the deck pile.

Input Assertion:  None

Output Assertion:  The output is assumed to hold six positive integer values.

Variables:  Deck

Author:  Susan Glaus

Remarks:  None

 

Title:  Reset Round Score

Module Id:  2.1.2.2

Purpose:  This module resets the round score.

Method:  This module erases the round score from memory and replaces with zeros.

Usage:  New Game

External References:  None

Calling Sequence:  Round Score – (O) Integer value of zero.

Input Assertion:  None

Output Assertion:  Round score is zero

Variables:  Round score

Author:  Susan Glaus

Remarks:  None

 

Title:  Deal 1 Card (User)

Module ID:  2.1.2.3.1

Purpose:  Place one card in the Hand of Player 1 and displays on the GUI

Method:  After updating Player1’s hand this module must make a call to Update Display, which will be shown on screen

Usage:  Deal Cards

External References:  None

Calling Sequence:  Card – (I) Card to deal to player. 

Input Assertion:  Card is valid according to the rules of the game

Output Assertion:  None

Variables:  None

Author(s):  Brandon Toone

Remarks:  None

 

Title:  Deal 1 Card (Opponent)

Module ID:  2.1.2.3.2

Purpose:  Place one card in the Hand of Player 2 and displays on the GUI

Method:  After updating Player 2’s hand this module must make a call to Update Display, which will be shown on screen

Usage:  Deal Cards

External References:  None

Calling Sequence:  Card – (I) Card to deal to player. 

Input Assertion:  None

Output Assertion:  None

Variables:  None

Author(s):  Brandon Toone

Remarks:  None

 

 

Title: Turn

Module ID: 2.1.2.4

Purpose:  To switch playing area to the user.

Method:  This module allows the user to draw a card, play or discard a card, and specify when the turn is done.

Usage:  New Game

External References:  None

Calling Sequence:  Player – (I) The current player

Input Assertion:  Player is an integer, 1 or 2.

Output Assertion:  None

Variables:  None

Author:  Susan Glaus

Remarks:  None

 

 

Title:  Draw Card

Module ID:  2.1.2.4.1

Purpose:  This module pops a card of the deck stack and passes it as an output.

Method:  This module will remove a card from the top of the deck.

Usage:  Turn

External References:  None

Calling Sequence:  Deck – (I) A data structure holding cards to be used.

Card – (O) An object that represents a card. 

Input Assertion:  Deck is assumed to be an array or stack of Cards.

Output Assertion:  Card is assumed to be a card from the structure Deck.

Variables:  Deck

Author(s):  Courtney Arnold

Remarks:  None

 

 

Title:  Check if Move is Valid

Module ID:  2.1.2.4.2.1

Purpose:  This module checks to see if the card being played can be played where it is being placed.

Method:  This module will check the current requirement of the given pile to see if the given pile can accept the given card.

Usage:  Play

External References:  None

Calling Sequence:  Card – (I) Card to be played.

Pile State – (I) The current state of the pile. 

Validity – (O) A boolean value, true if the card can be place and false if it cannot be placed

Input Assertion:  Card is assumed to be a card structure.

Pile State is assumed to be an interger value.

Output Assertion:  Validity is assumed to be a boolean value.

Variables:  None

Author(s):  Courtney Arnold

Remarks:  None

 

Title:  Play Card

Module ID:  2.1.2.4.2.2

Purpose:  This module passes a card from the players hand to the selected pile.

Method:  This module will remove the card from the player hand and will push the card to the top of the selected pile.

Usage:  Play

External References:  None

Calling Sequence:  Card – (I) Card to be removed from the player hand.

Piles – (I) A data structure representing the piles.

Pile – (I) An integer value.

Input Assertion:  Card is assumed to be of the card structure.

Piles is assumed to be an array of the Pile data structures.

Pile is assumed to be a valid integer between 0 and 6.

Output Assertion:  None

Variables:  Piles – A data structure representing the piles.

Author(s):  Courtney Arnold

Remarks:  None

 

Title: ChangePlayer

Module ID: 2.1.2.4.4.1

Purpose: Changes current player from player 1 to player 2 at the end of each turn.

Method: None

Usage: TurnDone

External References: None

Calling Sequence: Turn Done - (I) Confirms current turn is complete. Turn - (O) Starts next players turn.

Input Assertion: Current turn complete

Output Assertion: Next players turn

Variables: Current Player

Author(s): Mable Flickinger

Remarks: None

 

Title:  Discard

Module ID:  2.1.2.4.3

Purpose:  This module will remove the given card from play.

Method:  This module will remove a Card from the players hand.

Usage:  Turn

External References:  None

Calling Sequence:  Card – (I) Card to be removed. 

Input Assertion:  Card is assumed to be a Card in the players hand.

Output Assertion:  None

Variables:  None

Author(s):  Courtney Arnold

Remarks:  None

 

Title: UpdateGUI

Module ID: 2.1.2.5

Purpose: Method called by various parts of the game to update the GUI when changes are made.

Method: Repaint

Usage: All

External References: None

Calling Sequence: None

Input Assertion: None

Output Assertion: Display refreshed

Variables: None

Author(s): Mable Flickinger

Remarks: None

 

Title: Quit

Module ID: 2.1.3

Purpose: Exits the game returning to the host system.

Method: None

Usage: File

External References: None

Calling Sequence: Exits game.

Input Assertion: None

Output Assertion: None

Variables: None

Author(s): Mable Flickinger

Remarks: None

Title: View Score

Module ID: 2.1.4

Purpose: Displays the games high score. Which is the sum of all the rounds which have been played since either starting or clearing/resetting the score.

Method: None

Usage: File

External References: None

Calling Sequence: High score - (I) File or variable containing the high score information. Display location - (O) The high score will be displayed to the game GUI.

Input Assertion: High score information.

Output Assertion: None

Variables: PreviousScore, CurrentScore

Author(s): Mable Flickinger

Remarks: None

 

Title:  Reset Score

Module Id:  2.1.5

Purpose:  This module resets the high score.

Method:  This module erases the high score from memory and replaces with zeros.

Usage:  File

External References:  None

Calling Sequence:  Score – (O) Integer value of zero.

Input Assertion:  None

Output Assertion:  The high score zero.

Variables:  High score

Author:  Susan Glaus

Remarks:  None

 

Title:  Undo

Module Id:  2.1.6

Purpose:  This module allows the user to go back to the previous step.

Method:  This module will keep track of all moves and reset the card value that was most recently changes.  The previous and current moves will be held in two undo objects.  When the player selects ‘undo’ this method swap the current move object with the previous move object. 

Usage:  File

External References:  None

Calling Sequence:  Previous Card – (O) Data structure representing the previous card played.

Input Assertion:  None

Output Assertion:  None

Variables:  Current move and previous move

Author:  Susan Glaus

Remarks:  None

 

Title:  Instructions

Module ID:  2.2.1

Purpose:  This module displays an instructions file when called from the menu

Method:  None

Usage:  Help

External References:  None

Calling Sequence: Instructions file – (I) The instructions file packaged with game.  Display location – (O) The instructions file will always be displayed to the game GUI

Input Assertion:  A text file

Output Assertion:  None 

Variables:  None

Author(s):  Brandon Toone

Remarks:  None

 

Title:  About

Module ID:  2.2.2

Purpose:  Display to the User; name, version number and authors of game

Method:  None

Usage:  Help

External References:  None

Calling Sequence:  About file – (I) The file listing details of the game.  Display location – (O) The about file will always be displayed to the game GUI

Input Assertion:  A text file

Output Assertion:  None

Variables:  None

Author(s):  Brandon Toone

Remarks:  None

 

Title: gameBoard

Module ID: 3.0

Purpose: This module contains the graphics that comprise the game board, including the images for the front and back of the cards, as well as the trip distance, etc.

Method: None

Usage: Display

External References: None

Calling Sequence: Mouse – (I) User interaction with game.

Monitor – (O) Update display of cards, trip, etc.

Input Assertion: None

Output Assertion: Part of the graphical user interface

Variables: Height, width, contents, etc.

Author(s): Mable Flickinger

Remarks: None

 


2.4 Major Data Structures

 

The major data structures are as follows:

 

One pile = ArrayList

Piles = an array of piles

Card = Object

Deck = pile

Section 3 The User Interface Document
Back to JaMB Home