The Wildcats controller needs the current turn count to decide what to show. A sequence diagram distinguishes the request from the result traveling back.
Inside a Controller method, player1 refers to an existing Player with numberOfTurns equal to 2. Its GetNumberOfTurns() method returns that integer without changing it.
If the underlying C# feature is unfamiliar, use the lesson below while reading this example.
int turns = player1.GetNumberOfTurns();The controller asks player1 for its turn count
player1 reads its current count of 2
The value 2 returns to the waiting controller
The controller stores that result in its local variable turnsUse these words to follow one execution before drawing it. Keep the same order and the same alternatives as the source; simplify the wording without adding work that the code does not perform.
controller : Controller and player1 : Player. They exist before the call.GetNumberOfTurns(). Start player1's activation where it receives the request.2 and end the called activation.Store returned value in turns. Keep turns out of the participant headings because it is a caller-local integer.Compare this reference with the diagram you built in Violet. Layout may differ; the source meaning, labels, and relevant connections should agree.
The local variable turns receives 2 only after the call completes. A return carries a value back; it is not a second call made by the player.