Use Case 1--Play Game (Move Pac Man)
Context of Use:
The User wants to move the Pac Man icon around the board in order to collect all
of the dots and avoid the ghosts
Scope:
J2ME Pac-man Game Application
Level:
System Goal
Primary Actor:
The User
Stakeholders and Interests:
User: Wants to complete the level by moving Pac Man.
Preconditions:
The User has chosen to begin a game or continue a saved game and the game has
been initialized.
Minimal Guarantees:
The User will be able to make another movement choice after the current one.
Success Guarantees:
Pac Man is moved in the direction that the User entered.
Trigger:
The User pushes the ^Up ̄ button to move Pac Man up, the ^Down ̄ button to move
Pac Man down, the ^Left ̄ button to move Pac Man left, or the ^Right ̄ button to
move Pac Man right
Main Success Scenario:
- 1. The User pushes one of the movement buttons.
- 2. The Pac Man icon moves in the direction that the User entered.
- 3. The Pac Man icon continues to move in the same direction until
Extension 2a is reached.
Extensions:
- 0a. An exception is thrown while getting the User input.
- 0a1. Catch exception and continue listening for future User inputs.
- 1a. A ghost icon of Color 1 moves into the space where the Pac Man icon is
before the User inputs a movement command.
- 1a1. A message is displayed saying that the current turn is over.
- 1a2. The number of lives is decremented and game is ended if number of
lives reaches zero. (See End Game Use Case)
- 2a. The User tries to move the Pac Man icon into a space that has a wall.
- 2a1. The Pac Man icon does not move and the program continues listening
for future User inputs.
- 2b. The User tries to move the Pac Man icon into a space that has a dot in
it.
- 2b1. The Pac Man icon successfully moves into the space.
- 2b2. The dot is removed from the GUI.
- 2b3. A score of 10 points is added to the total score and updated on the
screen.
- 2c. The User tries to move the Pac Man icon into a space that has a super
dot in it.
- 2c1. The Pac Man icon successfully moves into the space.
- 2c2. The super dot is removed from the GUI.
- 2c3. A score of 50 points is added to the total score and updated on the
screen.
- 2c4. The ghost icons change to Color 2 and they are routed away from the
Pac Man icon.
- 2c5. After 15 seconds, the ghost icons are changed back to Color 1 and
routed towards the Pac Man icon.
- 2d. The User tries to move the Pac Man icon into a space that has a ghost
in it that is Color 1.
- 2d1. A message is displayed saying that the current turn is over.
- 2d2. The number of lives is decremented and game is ended if number of
lives reaches zero. (See End Game Use Case)
- 2e. The User tries to move the Pac Man icon into a space that has a ghost
in it that is Color 2.
- 2e1. The Pac Man icon successfully moves into the space.
- 2e2. The ghost is removed from the GUI.
- 2e3. A score of 100 times the number of ghosts of Color 2 captured is
added to the total score and updated on the screen.
- 2e4. A new ghost icon of Color 1 is added to the middle of the screen.
- 3a. The Pac Man icon moves into a space that doesn¨t have a wall and is on
the edge of the screen.
- 3a1. The Pac Man icon is moved to the corresponding space without a wall
on the opposite side of the screen.
Technology and Data Variations:
None.
Technology and Data Variations:
None.
Related Information:
PacMan Use Case 1 Sequence Diagram
PacMan Use Case 1 and 6 Class Diagram
PacMan Package Diagram
Pac Man Use Case Model