Use Case: Play Game - Amazing-Koalas/koala-kingdom GitHub Wiki

1. Brief Description

The goal of this use case is for the player to interact with the game. This use case consists of taking in various inputs/controls from the user to make their character perform different actions. These actions include movement, attack, gather, and build.

2. Included Use Cases

N/A

3. Preconditions

Character must be created
Player must have entered the game

4. Flow of Events

4.1 Basic Flow – The player manipulates the character to perform various actions.

  1. This use case begins when the player provides input to the system.
  2. The system ascertains that the input is valid and bound to a specific action.
  3. The system manipulates the character in a manner corresponding to the input.
  4. The use case repeats as long as the player remains in the game and continues to provide input.

4.2 Alternative Flows

None

4.3 Exception Flows

E1: System determines that the input is not valid or bound to an action.

  1. This flow begins when the system determines that the player’s input is not valid or bound to a control. Reference: Basic Flow Step 2.
  2. The character is not affected by the invalid input.
  3. The system awaits for valid input and the flow returns to Basic Flow Step 1.

5. Requirements

N/A

6. Post-conditions

a) The player’s character has completed the action

7. Notes & Open Issues

8. Out of Scope (Future Functionality)

Additional controls can be added in the future.


 

Appendix A – Data Definition for Play Game

Field Name Description Type Req’d Valid Values Edit/Notes
character object that the player manipulates to play the game Game Component Y Base Model
input Whatever the player inputs to manipulate the character keyboard Y KeyCodes valid input is held in keyCodes: currently-up, down, left, right, space