Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public void AddShip(Statistic.Ship ship, double timeScale)
 {
     shipQueue.Enqueue(ship);
     toWork.PushShip(timeScale);
 }