A Wildcats score array has indexed positions whose values can change. Draw the array at a chosen pause, not merely the initializer as originally written.
This excerpt runs inside an existing method. The diagram is taken after the correction to the second score.
If the underlying C# feature is unfamiliar, use the lesson below while reading this example.
int[] roundGoals = { 2, 0, 3 };
roundGoals[1] = 1;Create one integer array with scores 2, 0, and 3
Replace the score at index 1 with 1
Pause after the replacement
The same three positions now contain 2, 1, and 3These words fix the snapshot moment and separate instances, values, and reference targets. Follow the source to that pause before deciding how many boxes to draw and which current values belong inside them.
roundGoals : int[]. Keep the array type brackets in the header.[0], [1], and [2]. Enter current values 2, 1, and 3 beside them.Length = 3; snapshot after correction. Length counts positions, not the largest index.Compare this reference with the diagram you built in Violet. Layout may differ; the source meaning, labels, and relevant connections should agree.
Follow roundGoals[1] to the row marked [1]. It contains the value 1, not the index number because they happen to match. The valid indexes remain 0, 1, and 2.