CS435 Billiards Project Use Cases

Version: 1.0

Complied by Evan McCreedy

Milestone 1

1.1 Initialization, Configuration, Termination

ID: 1.1.1
Name: NewGame
Goal: The user wants to start a new game.
Success End Condition: Game is set up in inital configuration according to the type of game selected. Program is ready for input from breaking player.
Failed End Condition: None (always succeeds)
Primary Actor: User
Secondary Actor(s): None
Trigger: User indicates desire to start a new game.
Main Success Scenario:
  1. If a game is currently in progress:
    1. Program displays dialog warning to User that the current game will be quit.
    2. User confirms desire to quit the current game and start a new one through dialog UI.
    3. If User expresses desire not to quit the current game, the new game interface is closed and the current game is resumed.
  2. Program asks User the type of game desired.
  3. User selects game type.
  4. Program asks User to set options for the game (player names, breaking player, etc.)
  5. User sets game options.
  6. Program clears any game state which may be loaded by an in-progress game.
  7. Program initializes new game with selected type and configuration.
  8. Program waits for User input.
ID: 1.1.1.1
Name: SelectNewGame
Goal: The user wants to start a new game.
Success End Condition: Game is set up in inital configuration according to the type of game selected. Program is ready for input from breaking player.
Failed End Condition: None (always succeeds)
Primary Actor: User
Secondary Actor(s): None
Trigger: User selects the New Game option from the interface.
Main Success Scenario:
  1. User indicates through UI that a new game is desired.
  2. Further progress follows the path of Use Case 1.1.1.
ID: 1.1.1.2
Name: ProgramStartup
Goal: The user wants to start a new game.
Success End Condition: Game is set up in inital configuration according to the type of game selected. Program is ready for input from breaking player.
Failed End Condition: None (always succeeds)
Primary Actor: User
Secondary Actor(s): None
Trigger: User shows a desire to start a new game by executing the software.
Main Success Scenario:
  1. User starts up the software.
  2. Further progress follows the path of Use Case 1.1.1.
ID: 1.1.2
Name: GameCompletedStartNew
Goal: User wants to start a new game following the completion of a game.
Success End Condition: Game is set up in inital configuration according to the type of game selected. Program is ready for input from breaking player.
Failed End Condition: None (always succeeds)
Primary Actor: User
Secondary Actor(s): None
Trigger: The completion of a game of billiards.
Main Success Scenario:
  1. Program displays game completion dialog to User.
  2. User selects New Game option from dialog.
  3. Further progress follows the path of Use Case 1.1.1.
ID: 1.1.2.1
Name: GameCompletedRematch
Goal: User wants to start a new game with the same configuration as the last game played.
Success End Condition: Game is set up in inital configuration which is the same as in the last game played. Program is ready for input from breaking player.
Failed End Condition: None (always succeeds)
Primary Actor: User
Secondary Actor(s): None
Trigger: The completion of a game of billiards.
Main Success Scenario:
  1. Program displays game completion dialog to User.
  2. User selects Rematch option from dialog.
  3. Program initializes new game with type and configuration of the last game played.
  4. Program waits for User input.
ID: 1.1.2.2
Name: GameCompletedQuit
Goal: User wants to exit the software.
Success End Condition: All game state is cleared and the software has terminated.
Failed End Condition: None (always succeeds)
Primary Actor: User
Secondary Actor(s): None
Trigger: The completion of a game of billiards.
Main Success Scenario:
  1. Program displays game completion dialog to User.
  2. User selects Quit option from dialog.
  3. Program prompts User with quitting confirmation dialog.
  4. User confirms desire to quit through dialog.
  5. If User does not confirm desire to quit, leave the game completion dialog open and wait for input.
  6. Program cleans up any and all of its state and terminates normally.
ID: 1.1.3
Name: QuitGame
Goal: The user wants to end the current game and exit the program.
Success End Condition: All game state is cleared and the software has terminated.
Failed End Condition: None (always succeeds)
Primary Actor: User
Secondary Actor(s): None
Trigger: User selects Quit Game option from the UI.
Main Success Scenario:
  1. User selects Quit Game from the user interface.
  2. Program prompts User with quitting confirmation dialog.
  3. User confirms desire to quit through dialog.
  4. If User does not confirm desire to quit, do not change the game state and wait for further input.
  5. Program cleans up any and all of its state and terminates normally.

1.2 Game Play

ID: 1.2.1
Name: ShotInfo
Goal: User wants to enter in data for the next shot to be taken.
Success End Condition: Shot information changes made through the UI are saved by the Program.
Failed End Condition: No changes are made to the shot information and User is notified of the failure.
Primary Actor: User
Secondary Actor(s): None
Trigger: User shows desire to change shot data through the UI.
Main Success Scenario:
  1. User changes shot data using the user interface.
  2. Program gets new shot information from user interface.
  3. Program saves shot information so that it can be used on the next shot.
  4. Program waits for input from User.
ID: 1.2.2
Name: TakeShot
Goal: User wants to take a shot.
Success End Condition: Shot is completed and Program is ready for entry of new shot information.
Failed End Condition: User is informed of failure.
Primary Actor: User
Secondary Actor(s): None
Trigger: User decides to take a shot.
Main Success Scenario:
  1. User indicates through UI that a shot should be taken.
  2. Program gathers saved shot information.
  3. Program uses shot information to simulate the shot (the interaction between cue stick, balls, rails, pockets, etc.)
  4. Program displays simulation of shot.
  5. Program checks outcome of shot against current rule set and takes appropriate action accordingly.
ID: 1.2.2.1
Name: LegalShot
Goal: Take correct steps in response to a legal shot, as defined by the current game rules.
Success End Condition: Program waiting for input for the next shot.
Failed End Condition: None
Primary Actor: Rules System
Secondary Actor(s): None
Trigger: User takes a shot.
Main Success Scenario:
  1. Rules System receives shot outcome information from Program.
  2. Rules System determines that shot was legal.
  3. Rules System informs Program of shot legality.
  4. Program waits for User input of next shot from the player who took the last one.
ID: 1.2.2.2
Name: IllegalShot
Goal: Take correct steps in response to an illegal shot, as defined by the current game rules.
Success End Condition: Program waiting for input for the next shot.
Failed End Condition: None
Primary Actor: Rules System
Secondary Actor(s): None
Trigger: User takes a shot.
Main Success Scenario:
  1. Rules System receives shot outcome information from Program.
  2. Rules System determines that shot was illegal.
  3. Rules System determines any penalties which should be assessed.
  4. Rules System informs Program of shot legality and any penalties.
  5. Program waits for User input of next shot from the next player and assesses penalities.
ID: 1.2.2.3
Name: LosingShot
Goal: Take correct steps in response to a losing shot, as defined by the current game rules.
Success End Condition: Game is finished and User is shown game completed dialog.
Failed End Condition: None
Primary Actor: Rules System
Secondary Actor(s): None
Trigger: User takes a shot.
Main Success Scenario:
  1. Rules System receives shot outcome information from Program.
  2. Rules System determines that shot was a losing shot.
  3. Rules System tells Program about losing shot.
  4. Program informs User of the winner/loser of the game.
  5. Program displays game completion dialog.
ID: 1.2.2.4
Name: WinningShot
Goal: Take correct steps in response to a winning shot, as defined by the current game rules.
Success End Condition: Game is finished and User is shown game completed dialog.
Failed End Condition: None
Primary Actor: Rules System
Secondary Actor(s): None
Trigger: User takes a shot.
Main Success Scenario:
  1. Rules System receives shot outcome information from Program.
  2. Rules System determines that shot was a winning shot.
  3. Rules System tells Program about winning shot.
  4. Program informs User of the winner/loser of the game.
  5. Program displays game completion dialog.

Milestone 2

2.1 Game Play

ID: 2.1.1
Name: 3DBallMovement
Goal: Simulate the motion of balls in three dimensions.
Success End Condition: Changes have been made to the game state due to the motion of the ball according to the laws of physics in a realistic and believable manner.
Failed End Condition: None
Primary Actor: A Ball
Secondary Actor(s): None
Trigger: The motion of a Ball in the z-axis due to a shot.
Main Success Scenario:
  1. Program calculates the motion of the Ball in space using the a physics model.
  2. System displays the motion of the Ball on the display interface.
ID: 2.1.2
Name: BallSpin
Goal: Simulate the spinning of balls when hit at an angle.
Success End Condition: Changes have been made to the game state due to the motion of the ball according to the laws of physics in a realistic and believable manner.
Failed End Condition: None
Primary Actor: A Ball
Secondary Actor(s): None
Trigger: A shot is taken which would result in giving a Ball spin.
Main Success Scenario:
  1. Program calculates the angular momentum and motion of the spinning Ball using the a physics model.
  2. System displays the motion of the Ball on the display interface.

Milestone 3

3.1 Game Initialization

ID: 3.1.1
Name: StartNetworkGame
Goal: User wants to start a game server.
Success End Condition: Game server is ready to accept Remote Users who wish to join the game.
Failed End Condition: Program does not successfully setup a network game server.
Primary Actor: User
Secondary Actor(s): None
Trigger: User desides to run a game server.
Main Success Scenario:
  1. User uses interface to indicate desire to start a game server.
  2. Program prompts User for server configuration.
  3. User enters configuration parameters
  4. Program initializes network server, which waits for incoming Remote Users to connect.
ID: 3.1.2
Name: JoinNetworkGame
Goal: User wants to join a server to play a game of billiards over the network.
Success End Condition: Program is waiting for input from User or waiting for shot information from Remote Server.
Failed End Condition: Program is not connected to the Remote Server.
Primary Actor: User
Secondary Actor(s): Remote Server
Trigger: User desides to play a game of billiards with a Remote Server.
Main Success Scenario:
  1. User indicates through interface that he/she wants to start a networked game.
  2. Program asks User for information identifying Remote Server.
  3. User enters server information into interface.
  4. Program attempts to connect to Remote Server.
  5. If connection attempt fails, Program informs User and prompts for information about another Remote Server.
  6. If connection succeeds, Remote Server sends game configuration options to Program and initial game state information is set up in both Program and Remote Server.
  7. Either Remote Server or Program waits the breaking User to enter input, depending on selection of breaking player in the Remote Server's configuration.
ID: 3.1.3
Name: ObserveNetworkGame
Goal: User wants to join a server to observe a game of billiards being played over the network.
Success End Condition: Program is set up to observe a game on Remote Server.
Failed End Condition: Program not ready to observer network game on Remote Server.
Primary Actor: User
Secondary Actor(s): Remote Server, Remote Player
Trigger: User desides to watch a game of billiards on a Remote Server.
Main Success Scenario:
  1. User indicates through interface that he/she wants to observe a networked game.
  2. Program asks User for information identifying Remote Server.
  3. User enters server information into interface.
  4. Program attempts to connect to Remote Server.
  5. If connection attempt fails, Program informs User and prompts for information about another Remote Server.
  6. If connection succeeds, Remote Server sends game configuration options to Program and initial game state information is set up in both Program and Remote Server.
  7. Either Program waits for shot information from a Remote Player or the Remote Server.

3.2 Game Play

ID: 3.2.1
Name: NetworkSendShot
Goal: Communicate shot information to other parties to a networked game.
Success End Condition: Everyone in the game has received the shot information for the shot that was made.
Failed End Condition: Someone does not receive the shot information for the taken shot.
Primary Actor: User
Secondary Actor(s): Remote Player, Observers, Server
Trigger: A shot is taken.
Main Success Scenario:
  1. User takes a shot.
  2. Program encodes shot information and transmitts it to Remote Player.
  3. Server (either on the local machine or on Remote Player's machine) transmits shot information to all Observers.
  4. All involved clients decode the shot information and process it like they would any shot received through the local UI.
  5. Program, Remote Program, Observer Programs all calculate the results of the shot and display them to their respective Users.

3.3 Game Termination

ID: 3.3.1
Name: QuitNetworkGame
Goal: User wants to quit a networked game.
Success End Condition: Program is terminated and the Remote User, along with any Observers, are notified that the game is finished.
Failed End Condition: None
Primary Actor: User
Secondary Actor(s): Remote User, Observers
Trigger: User decides to quit the networked game.
Main Success Scenario:
  1. User indicates desire to quit game through UI.
  2. Program displays confirmation dialog.
  3. User confirms desire to leave game.
  4. Program informs Remote User and any Observers of the end of the game.
  5. Program cleans up any remaining state and terminates normally.