public void Play() { Carts.Add(Warehouses.ElementAt(0).SpawnCart()); OutputView.StandardScreen(); while (true) { Random r = new Random(); if (Points == 0) { Max = 10; } else { double MaxDouble = (10 / Points) * 1.5; Max = (Int32)MaxDouble; } double Seconds = Max / 2; int ExtraSeconds = (Int32)Seconds; InputView.ChangeSwitch(ExtraSeconds); OutputView.StandardScreen(); foreach (var c in Carts.ToList()) { if (!c.Move()) { EndGame(); } } Ship.Move(); foreach (var w in Warehouses) { if (r.Next(Max) == Max - 1) { Carts.Add(w.SpawnCart()); } } OutputView.StandardScreen(); } }