UpdateTargets Flashcards

1
Q

What is the purpose of this for loop?

for (int Count = 0; Count < Targets.Count - 1; Count++)
{
Targets[Count] = Targets[Count + 1];
}
Targets.RemoveAt(Targets.Count - 1);

A

Moves all targets one step left, removing the front-most target from the game board visually.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How are new targets added ?

A

In training mode, we recycle the final item.
Targets.Add(Targets[Targets.Count - 1]);

In random mode, we generate a fresh random target.
Targets.Add(GetTarget(MaxTarget));

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the purpose of this funtion?

A

Keeps the “conveyor belt” of targets moving. Called once per turn if we haven’t ended the game.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly