public bool PopShip(double timeScale) { if (nextShipTimes.Count == 0) { return(false); } var ship = new Statistic.Ship(timeScale, 3); shipQueue.AddShip(ship, timeScale); nextShipTimes.RemoveAt(0); if (nextShipTimes.Count == 0) { endTime = double.MaxValue; } else { endTime = nextShipTimes[0]; } return(true); }
public void AddShip(Statistic.Ship ship, double timeScale) { shipQueue.Enqueue(ship); toWork.PushShip(timeScale); }