private void UpdateBonuses() { List <Bonus> IntersectingBonuses = GameLevel.GetIntersectingBonuses(this); foreach (Bonus B in IntersectingBonuses) { B.PickUp(Id); B.Remove(); } for (int i = 0; i < PickedBonuses.Count; ++i) { Bonus B = PickedBonuses[i]; B.CheckUsing(); if (B.Used) { PickedBonuses.RemoveAt(i); } } SetImmortalness(Bonus.IsImmortalA()); if (Bonus.IsAccelerationA()) { MaxSpeed = MAX_SPEED * 2; } else { MaxSpeed = MAX_SPEED; // If the tank is at maximum bonus speed now, then slow it down to ordinary maximum speed if (Speed > MaxSpeed) { Speed = MaxSpeed; } } }