public void MainLoop() { float dt = timer.ElapsedMilliseconds / 1000f; timer.Restart(); ResetReload(Player, dt); Tanks.ForEach(tank => ResetReload(tank, dt)); CreateApple(2); CreateTank(1); RotateTank(0.5f); Collision(dt); ShootTanks(); if (!StatisticsForm.isClosed) { RefreshLog(); form.RefreshDgv(logs); } func f; if (IsGame) { f = Player.SetSprite; Booms.ForEach(i => f += i.SetSprite); f(dt); } Booms.Where(boom => boom.EndAnimation()).ToList() .ForEach(bang => Booms.Remove(bang)); view.Render(IsGame); }