Esempio n. 1
0
 /// <summary>
 /// executes an order of packs for the orderer
 /// </summary>
 /// <param name="orderer"></param>
 /// <param name="pack"></param>
 /// <returns>true on succesful order</returns>
 public bool FillOrder()
 {
     if (Orderer.CurrencyAmount >= Total)
     {
         Orderer.CurrencyAmount -= Total;
         int cards = 8 * Pack.PackQty;
         for (int i = 0; i < cards; ++i)
         {
             Orderer.AddCardToInventory(Pack.CreateCard());
         }
         return(true);
     }
     else
     {
         return(false);
     }
 }