1

I have to design an use case diagram of a game for the project at school The game must have these functions:

  1. On the main screen:
    • Start: start the game.
    • Exit: exit the program. Be sure to ask users if they really want to quit the game
    • Help: Show guide for playing the game
  2. In the game:
    • Gameboard: The gameboard consists of 10 squares, divided into 2 rows, and 2 half-circle on the 2 ends of the board. Initially, each square has 5 small stones and each half-circle has 1 big stone. Each small stone equals 1 point, and each big gem equals 5 points.
    • For each turn, the game must show clearly whose turn it is. A player will select a square and a direction to spread the gems. He got points when after finishing spreading, there is one empty square followed by a square with gems. The score the got for that turn is equal to the number of gems in that followed square (see the gameplay for more details about streaks)
    • The game ends when there is no gem in both half-circles. The game must notify who is the winner and the score of each player.

Here is my use case diagram:

enter image description here

Did I write the right diagram?

Christophe
  • 68,716
  • 7
  • 72
  • 138
  • See also [How to create great screenshots?](http://meta.stackexchange.com/q/99734/155831) The tip most relevant here is to trim the image to the important part. – Andrew Thompson May 29 '21 at 16:34

1 Answers1

0

Use cases are about the actor's objectives and not about the user interface:

  • Play game is clearly the main objective of Player.
  • View game rules can arguably be a distinct objective. The Player may want to read it before starting a game. We could also imagine, that a Player may want to view it during the game, for example in case of doubts about the legality of a specific move.
  • Exit game does not seem to be a separate objective. I may want to install a game just to read the rules if there is no other way to find them out. But I'd never install a game just for using the "Exit". Exit is just a mandatory feature, but not something that the user values.

The details of the rules suggest that there may be several players. You may therefore consider to add a multiplicity 1..2 or 1..* on the Player side of the link between the Play game an Player (unless it is meant to be one human player vs. the computer).

Christophe
  • 68,716
  • 7
  • 72
  • 138