Accept MIL-003 and add the Play a Game use case
Create the use case chain for the game loop task: Use Case Diagram UCD-001, User Stories US-001 (two stories), Use Case UC-001 and System Sequence Diagram SSD-001, all Proposed. Link them from MIL-003. Review MIL-003 (RC-006, Go) and accept it. Add the new artifacts to the Traceability Matrix and register UCD, US, UC and SSD in the artifact registry. Refs #13
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
# System Sequence Diagram: Play a Game
|
||||
|
||||
## Metadata
|
||||
| Key | Value |
|
||||
| --- | --- |
|
||||
| ID | SSD-001 |
|
||||
| CrossReference | [UC-001] |
|
||||
|
||||
## Version History
|
||||
| Date | Status | Author | Reviewer | Change | Commit |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| 2026-10-04 | Proposed | Jens Tirsvad Nielsen | S01 | Initial version | pending |
|
||||
|
||||
---
|
||||
|
||||
## Source Use Case
|
||||
|
||||
[UC-001] Play a Game, main success scenario. The alternative flows (invalid answer, tie, no account left) are out of scope for this diagram.
|
||||
|
||||
## Diagram
|
||||
|
||||
```plantuml
|
||||
@startuml
|
||||
actor Player
|
||||
participant ":System" as System
|
||||
Player -> System : startGame()
|
||||
System --> Player : accounts A and B
|
||||
loop while the guess is right
|
||||
Player -> System : makeGuess(choice)
|
||||
System --> Player : right, score, new accounts A and B
|
||||
end
|
||||
Player -> System : makeGuess(choice)
|
||||
System --> Player : wrong, final score
|
||||
@enduml
|
||||
```
|
||||
|
||||
## System Operations Table
|
||||
|
||||
| Step | Message (verb phrase) | Parameters | Return | Use case step |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| 1 | startGame | none | accounts A and B | 1, 2 |
|
||||
| 2 | makeGuess | choice (A or B) | right, new score, new accounts A and B | 3, 4, 5, 6 |
|
||||
| 3 | makeGuess | choice (A or B) | wrong, final score | 3, 7 |
|
||||
|
||||
Steps 2 and 3 are the same operation; the loop shows the right-guess outcome repeating, and the last call shows the wrong-guess outcome.
|
||||
|
||||
## Lifecycle Notes
|
||||
|
||||
A game starts with `startGame` and ends when `makeGuess` returns wrong; the System keeps the score and the current accounts in between.
|
||||
|
||||
---
|
||||
|
||||
[UC-001]: ./uc.md
|
||||
@@ -0,0 +1,77 @@
|
||||
# UC-001 Play a Game
|
||||
|
||||
## Metadata
|
||||
| Key | Value |
|
||||
| --- | --- |
|
||||
| ID | UC-001 |
|
||||
| CrossReference | [UCD-001], [US-001], [SA-001], [SSD-001] |
|
||||
|
||||
## Version History
|
||||
| Date | Status | Author | Reviewer | Change | Commit |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| 2026-10-04 | Proposed | Jens Tirsvad Nielsen | S01 | Initial version | pending |
|
||||
|
||||
---
|
||||
|
||||
Format: Fully Dressed
|
||||
|
||||
## Scope
|
||||
|
||||
The Higher Lower console game.
|
||||
|
||||
## Level
|
||||
|
||||
User goal.
|
||||
|
||||
## Primary Actor
|
||||
|
||||
Player.
|
||||
|
||||
## Stakeholders and Interests
|
||||
|
||||
| Stakeholder | Interest |
|
||||
| --- | --- |
|
||||
| S01 | A correct game that shows good practice ([SA-001]) |
|
||||
| S02 | Readable behaviour that matches the assignment ([SA-001]) |
|
||||
|
||||
## Preconditions
|
||||
|
||||
The Player has started the game.
|
||||
|
||||
## Postconditions (Success Guarantee)
|
||||
|
||||
The Player has seen the final score of the game.
|
||||
|
||||
## Main Success Scenario
|
||||
|
||||
1. The Player starts a game.
|
||||
2. The System shows two different accounts, A and B.
|
||||
3. The Player guesses which account has more followers.
|
||||
4. The System tells the Player the guess was right, adds one to the score, and shows the new score.
|
||||
5. The System makes the account the Player compared against the new A and shows a new B.
|
||||
6. The Player repeats from step 3 until a guess is wrong.
|
||||
7. The System tells the Player the guess was wrong and shows the final score.
|
||||
|
||||
## Extensions / Alternative Flows
|
||||
|
||||
- 3a. The Player gives an answer that is not a valid choice: the System asks again; the round does not change.
|
||||
- 3b. Both accounts have the same number of followers: either choice counts as right.
|
||||
- 5a. No account is left that differs from the current A: the System ends the game and shows the final score.
|
||||
|
||||
No `<<include>>` or `<<extend>>` use cases apply.
|
||||
|
||||
## Special Requirements / Business Rules
|
||||
|
||||
- Step 2 and 5: A and B are never the same account.
|
||||
- Step 3b: equal follower counts make both choices right.
|
||||
|
||||
## Open Issues
|
||||
|
||||
None.
|
||||
|
||||
---
|
||||
|
||||
[UCD-001]: ../use-case-diagram.md
|
||||
[US-001]: ../user-stories.md
|
||||
[SA-001]: ../stakeholder-analysis.md
|
||||
[SSD-001]: ./ssd.md
|
||||
Reference in New Issue
Block a user