Use Case: Play Brickles Preconditions: Instance of Brickles Game running. Game in PLAY state Test Input: Puck strikes brick Expected Output: Puck uses collision algorithm. Reflects appropriately from brick. Adds appropriately to score. Effects brick (ex damage brick, remove brick) Use Case: Play Bowling Preconditions: Instance of Bowling Game running. Game in PLAY state. Ball rolling down alley according to movement algorithm. First half of Frame. Test Input: Ball strikes pins and scores STRIKE. Expected Output: Ball removed form play. Frame recorded as a STRIKE. Game checks if there is another frame. If so, plays that frame. DOES NOT advance to second half of Frame. Use Case Tested: AGM 006 Pre-Condition: Brickles game was started and has stopped Input: Actor responds to Win/Lose/Tie dialog Expected Result: Reinitialize Brickles and redisplay game board The upper half of the sequence diagram covers the pre-condition that the Brickles game is being played. The game stops when the player wins, looses or ties the game. This is represented by the Stop message. A dialogue box depicting the outcome appears. On clicking the left mouse button the dialog box disappears. This is represented by the new Mouse message (b/1). The game is then reinitialized and game board redisplayed as depicted in the lower half of the diagram. Scenario2: Save Game Use Case Tested: AGM 003 Pre-Condition: Game is running and game is in progress Input: Actor Selects "Saves Game" Expected Result: Game is saved to a specified file and Game resumes Steps 1 to 8 of the sequence diagram cover the pre-condition that the Brickles game is in progress. The user can save the game by clicking on the save game option on the Game Menu. This is represented by steps 9 and 10. The test that the game has been saved the tester loads the same game. If the save was successful the game resumes from the same point. Test Scenario #1 -------------------- [Pre-Condition] Game is running and user has started playing [Trigger] Save game option is clicked and user specified a file name with illegal characters in it. Or the file name is longer than the allowed length. [Expected Result] Error message is shown to user. Nothing is saved. Test Scenario #2 -------------------- [Pre-Condition] Game play is in progress [Trigger] The game's moveable object (ie. Paddle, Bowling ball, etc) is moved to the far right and user keeps pressing the right directional button. [Expected Result] The object (Paddle, etc) stays at far right position hitting the wall but not moving over the wall. Scenario: T004 Use Case: AGM004 Associated Actor: GameInstaller or GamePlayer Preconditions: - There exists an active Game Session. - The user selects Save Score from the Application File Menu. Postconditions: - The game engine pauses - A File Chooser Window is presented to the user, from which they may specify a file in which to save the current score for the active Game Session. - The game score is saved in a file, or an exception is raised from lack of free space, or existing file with the specified name. - The File Chooser Window closes, and the game engine unpauses, resuming play for the user. Area Under Test (sequence of action): - The user selects Save Score from the Application File Menu - The game engine pauses - A File Choooser Window is presented to the user - Closing the File Chooser Window (cancelling the request to save the score) unpauses the game session, resuming play for the user at the time of the pause. - Ensure that no file was created or saved as a result of the previous steps. Scenario: T007 Use Case: AGM007 Associated Actor: Game Player or Game Installer PreConditions: - The software has been installed on the system. - The user has started the software on the system. PostConditions: -The game has begun. -The user was able to play the game successfully Area Under Test (sequence of action): -The user selects 'PLAY' from the Menu -The software initiallizes the new game -The software displays a new game board -The user clicks the left mouse button -The game's action starts -The game completes its action Test Case #9 ~V Initialization~E(from Assignment 3) ~U Scenario - The user is about to Play Brickles or Pong (or Bowling). ~U Precondition ~V Brickles or Pong (or Bowling) has begun operation. ~U Action - The user clicks on Brickles or Pong or Bowling. ~U Outcome ~V Standard instances of the required classes are created. Enters the READY state. Test Case #13 ~V Set Speed of Play~E(from Assignment 3) ~U Scenario ~V The user wants to set the speed of the Game. ~U Precondition ~V Game is executing and game has a user interface control that allows selection of Play speed. ~U Action ~V The user uses control on the user interface and indicates a desired speed. ~U Outcome ~VChanging the speed to match the user~Rs selection. AGM008 ~V Play Bowling Scenario Pre: AGM011 (Install game) has completed successfully. Trigger: The Bowling game has been selected by the user to play. The system is ready for game action, which takes 10 frames and a bonus throw. The user positions the mouse and uses a left click or equivalent to send the ball down the alley. This is then repeated for the second bowl of the frame. Expected Result: The system initializes the game and displays the game board, and the user can now play. After the user positions the mouse and clicks, the system moves the ball down the alley using a randomly selected algorithm. When the ball reaches the pins, any collisions result in the pins moving in ways determined by the physics of the collision. Then the system counts the number of pins knocked down. The score is then computed for the frame by adding the total from both throws and is displayed for the user. AGM008 ~V Play Bowling Scenario Pre: AGM011 (Install game) has completed successfully. Trigger: The Bowling game has been selected by the user to play. The system is ready for game action, which takes 10 frames and a bonus throw. The user positions the mouse and uses a left click or equivalent to send the ball down the alley. This is then repeated for the second bowl of the frame. Expected Result: The system initializes the game and displays the game board, and the user can now play. After the user positions the mouse and clicks, the system moves the ball down the alley using a randomly selected algorithm. When the ball reaches the pins, any collisions result in the pins moving in ways determined by the physics of the collision. Then the system counts the number of pins knocked down. The score is then computed for the frame by adding the total from both throws and is displayed for the user.