Use-case descriptions
Use Case 1: Non-Playing User Hosts a Game Lobby
Actor(s): User
Preconditions:
- User is on the Scribblers! website homepage.
Flow of Events:
- User clicks the "Create Lobby" button.
- User specifies the "Max Players" (2–8).
- User specifies the "Number of Rounds" (1–10).
- User clicks the "Launch Room" button.
Postconditions:
- A new game lobby is created without the host participating as a player.
Use Case 2: Playing User Hosts a Game Lobby
Actor(s): User
Preconditions:
- User is on the Scribblers! website homepage.
Flow of Events:
- User clicks the "Create Lobby" button.
- User specifies the "Max Players" (2–8).
- User specifies the "Number of Rounds" (1–10).
- User clicks the "I'm Playing Too" button.
- User selects an avatar.
- User clicks the "Launch Room" button.
Postconditions:
- A new game lobby is created with the host participating as a player.
Use Case 3: Hosting User Shares Game Lobby Code
Actor(s): Hosting user
Preconditions:
- A game lobby has been created.
Flow of Events:
- A shape-based room code is generated automatically.
- User views the room code on screen.
- User shares the room code with other players.
Postconditions:
- Other players are able to join the lobby using the shared code.
Use Case 4: User Joins an Existing Game Lobby
Actor(s): User
Preconditions:
- User has received a valid room code.
Flow of Events:
- User navigates to the Scribblers! website.
- User clicks the "Join Lobby" button.
- User enters the provided room code.
- User selects an avatar.
- User clicks the "Join Lobby" button.
Postconditions:
- User successfully joins the existing lobby.
Use Case 5: User Attempts to Join a Non-Existing Lobby
Actor(s): User
Preconditions:
- User is on the Scribblers! website.
Flow of Events:
- User clicks the "Join Lobby" button.
- User enters a random or incorrect room code.
- User selects an avatar.
- User clicks the "Join Lobby" button.
- An error message is displayed indicating the room does not exist.
Postconditions:
- User remains on the "Join Lobby" screen.
Use Case 6: Hosting User Starts a Game
Actor(s): Hosting user
Preconditions:
- A lobby has been created and players have joined.
Flow of Events:
- Host waits for players to join the lobby.
- Host clicks the "Start Game" button once ready.
Postconditions:
- The game begins, and the first round starts.
Use Case 7: User is Presented with a Drawing Prompt
Actor(s): Drawing user
Preconditions:
- Game has started, and it is the user's turn to draw.
Flow of Events:
- User is selected to draw.
- User is shown a prompt word above the drawing board.
- User is shown an image associated with the prompt word.
Postconditions:
- User prepares to draw the assigned prompt.
Use Case 8: User is Assigned to Draw on the Drawing Board
Actor(s): Drawing user
Preconditions:
- User has been assigned the drawing role.
Flow of Events:
- User's avatar displays a "Drawer" status and a pencil icon.
- User gains access to drawing tools.
- User draws by dragging finger or mouse across the canvas.
Postconditions:
- Drawing is broadcasted to all connected users.
Use Case 9: Drawer Undoes a Drawing Stroke
Actor(s): Drawing user
Preconditions:
- User is actively drawing.
Flow of Events:
- User clicks the "Undo" button.
- The most recent stroke is undone on the canvas for all users.
Postconditions:
- Canvas updates reflect the undone stroke for all players.
Use Case 10: Drawer Clears the Drawing Board
Actor(s): Drawing user
Preconditions:
- User is actively drawing.
Flow of Events:
- User clicks the "Clear" button.
- Entire drawing board is cleared for all users.
Postconditions:
- Canvas is reset to blank for all players.
Use Case 11: Drawer Changes Stroke Color
Actor(s): Drawing user
Preconditions:
- User is actively drawing.
Flow of Events:
- User clicks a color option from the palette.
- User continues drawing with the selected stroke color.
Postconditions:
- New stroke color is displayed on the canvas.
Use Case 12: Drawer Changes Stroke Width
Actor(s): Drawing user
Preconditions:
- User is actively drawing.
Flow of Events:
- User adjusts the stroke width slider.
- User continues drawing with the selected stroke width.
Postconditions:
- New stroke width is applied to the canvas.
Use Case 13: User is Assigned the Role of Guesser
Actor(s): Guessing user
Preconditions:
- A drawing round is in progress.
Flow of Events:
- User is assigned as a guesser.
- User is shown the drawing canvas and an AAC board of possible guesses.
Postconditions:
- User is able to select guesses based on the drawing.
Use Case 14: Guesser Selects an Incorrect Guess
Actor(s): Guessing user
Preconditions:
- User is viewing the AAC board during a round.
Flow of Events:
- User selects an incorrect guess from the AAC board.
- Guess is displayed on the message board.
- AAC board becomes temporarily disabled for 5 seconds.
Postconditions:
- User must wait before making another guess.
Use Case 15: Guesser Selects a Correct Guess
Actor(s): Guessing user
Preconditions:
- User is viewing the AAC board during a round.
Flow of Events:
- User selects the correct guess.
- "Correct" message is displayed next to the user's avatar.
- A checkmark image is shown beside the message.
- User’s score is calculated based on time remaining.
- AAC board disappears from the user's screen.
Postconditions:
- User successfully guessed the drawing.
Use Case 16: All Guessers Guess Correctly
Actor(s): All guessing users
Preconditions:
- A drawing round is in progress.
Flow of Events:
- All guessers select the correct guess before the timer ends.
- A popup appears indicating all users guessed correctly.
- Round ends and new roles are assigned.
- A new round begins.
Postconditions:
- Game progresses to the next round.
Use Case 17: Round Timer Ends Before All Guessers Guess Correctly
Actor(s): All players
Preconditions:
- A drawing round is in progress.
Flow of Events:
- Round timer reaches zero.
- A popup appears indicating time has run out.
- Round ends and new roles are assigned.
- A new round begins.
Postconditions:
- Game progresses to the next round without all correct guesses.
Use Case 18: Game Ends (Regular Player)
Actor(s): All players (non-host)
Preconditions:
- The maximum number of rounds is reached.
Flow of Events:
- Game session ends.
- Endgame screen displays final leaderboard.
- User clicks the "Leave Lobby" button.
Postconditions:
- User returns to the main website or lobby list.
Use Case 19: Game Ends (Host)
Actor(s): Hosting user
Preconditions:
- The maximum number of rounds is reached.
Flow of Events:
- Game session ends.
- Endgame screen displays final leaderboard.
- Host is presented with a "Play Again" button and "Leave Lobby" button.
Postconditions:
- Host can choose to start a new game or leave the lobby.
Use Case 20: Users Choose to Play Again After Game Ends
Actor(s): Hosting user and players
Preconditions:
- Game session has ended, and players are on the endgame screen.
Flow of Events:
- Host clicks the "Play Again" button.
- All users are returned to the lobby.
- Host clicks the "Start Game" button to begin a new session.
Postconditions:
- A new game session starts with the same players.