Use cases

The first design meetings tackled about the actions the User would have to be able to perform. The team decided to work on an application with three main Scenes:

  • Scene #1: The starting menù
  • Scene #2: The level selection menù
  • Scene #3: The main playing menù

Later, a set of use cases were developed for each Scene.
The team so proceded creating the use case diagram.

Use case diagram

Use case diagram

Use case #1

Use case name

Start a game

Actors

  • User

Description

The User starts a game, either performing use case #2 or use case #3.

Preconditions

None 

Flow

  1. The User is on Scene #1
    • The User performs use case #2
    • The User performs use case #3

Postconditions

The user is on Scene #2 viewing the 4 configs to chose from, or the user is on Scene #3 viewing the game board with the chosen configuration.

Use case #2

Use case name

Start a new game

Actors

  • User

Description

The User starts a new game.

Preconditions

None 

Flow

    1. The User clicks on the “New Game” button on Scene #1
    2. The User performs use case #4
    1. The User clicks on the “Back” button on the top bar in Scene #3
    2. The User performs use case #4

Postconditions

The User is on Scene #3 viewing the game board with one of the default configurations.

Use case #3

Use case name

Resume Game

Actors

  • User

Description

The User resume a saved game.

Preconditions

Use case #10 must have been performed at least once

Flow

  1. The User clicks on the “Resume Game” on Scene #1
  2. The User selects the saved file according to the OS procedure

Postconditions

The User is on Scene #3 viewing the game board with the previously saved configuration.

Use case #4

Use case name

Choose initial configuration

Actors

  • User

Description

The User chooses the initial configuration from four default configurations.

Preconditions

User must be on Scene #2

Flow

  1. The User clicks on one of the default configurations

Postconditions

The User is on Scene #3 viewing the game board with the chosen default configuration.

Use case #5

Use case name

Play the game

Actors

  • User

Description

The User can play the game according to klotski rules and solve a puzzle.

Preconditions

Use case #1

Flow

  1. After performing use case #1 the User can start to play the game according to the klotski rules and use the other funcionalities described in the use cases #8, #9 and #10

Postconditions

"Level Completed" message appears if final configuration is reached

Use case #6

Use case name

Move the blocks

Actors

  • User

Description

The User can move the blocks according to the klotksi rules.

Preconditions

Use case #1

Flow

  1. The User drags a block in the board according to the klotski rules.

Postconditions

The board configuration modifies according to the moved blocks

Use case #7

Use case name

Undo last move

Actors

  • User

Description

The board configuration returns as it was before the latest move was performed.

Preconditions

Use case #6 must have been performed at least once

Flow

  1. The User clicks on the “Undo” button on Scene #3.

Postconditions

The board configuration must return as it was before the latest move was performed.

Use case #8

Use case name

Reset

Actors

  • User

Description

The User reset the board configuration to the default one.

Preconditions

Use case #6 must have been performed at least once

Flow

  1. The User clicks on the “Reset” button on Scene #3

Postconditions

The board configuration returns to the starting state.

Use case #9

Use case name

Next Best Move

Actors

  • User

Description

The User makes the system playing the next best move.

Preconditions

  • None if no moves other than the best moves are performed

  • Python installed

Flow

  1. The User clicks on the “Next Best Move” button on Scene #3

Postconditions

The user is viewing the configuration after the next best move is performed.

Use case #10

Use case name

Save

Actors

  • User

Description

The User saves the current board configuration.

Preconditions

Use case #6 must have been performed at least once

Flow

  1. The User clicks on the “Save” button on Scene #3
  2. The User saves the configuration according to the OS procedure

Postconditions

The current board configuration must be saved locally.

Use case #11

Use case name

Go to GitHub

Actors

  • User

Description

The User opens the GitHub repository

Preconditions

Internet connection

Flow

  1. The User clicks on the “GitHub” button

Postconditions

The GitHub repository webpage is open on the browser.

Use case #12

Use case name

Show Documentation

Actors

  • User

Description

The User opens the documentation web page.

Preconditions

Internet connection

Flow

  1. The User clicks on the “Wiki” button

Postconditions

The documentation web page is open on the browser.