Beispiel #1
0
        public Box TakeBox(int j)
        {
            Box took = CarryingNow[j];

            CarryingNow.Remove(took);
            volumecarrying -= took.volume;
            return(took);
        }
Beispiel #2
0
        public void GroupMyBoxes()
        {
            for (int i = 0; i < CarryingNow.Count; i++)
            {
                for (int j = i + 1; j < CarryingNow.Count; j++)
                {
                    if ((CarryingNow[i].adress == CarryingNow[j].adress) && (CarryingNow[j].volume + CarryingNow[i].volume <= 1000))
                    {
                        CarryingNow[i] = CarryingNow[j] + CarryingNow[i];
                        CarryingNow.Remove(CarryingNow[j]);

                        j--;
                    }
                }
            }
        }
Beispiel #3
0
 public Box TakeBox(Box item)
 {
     CarryingNow.Remove(item);
     return(item);
 }