static void Main() { Settings.ScreenSettings(); ArmyOfInvaders.InitializeArmyOfInvaders(); Player.InitializePlayer(); int stepCount = 0; int armyOfInvadersSpeed = 50; while (true) { stepCount++; if (stepCount % armyOfInvadersSpeed == 0) { Draw.EraseItem(ArmyOfInvaders.armyOfInvaders); ArmyOfInvaders.armyOfInvaders.Clear(); ArmyOfInvaders.InitializeArmyOfInvaders(Movement.moveY, Movement.moveX); Movement.MovementArmyOfInvaders(); stepCount = 0; } Console.CursorVisible = false; Draw.DrawItem(ArmyOfInvaders.armyOfInvaders); Draw.EraseItem(Player.player); Shoot.GenerateShot(); Movement.MovementPlayer(); Draw.DrawItem(Player.player); Draw.DrawShoot(); Draw.EraseShoot(); Collision.InvaderGotShot(); Thread.Sleep(Common.gameSpeed); } }