Esempio n. 1
0
        public void cashOutPocket()
        {
            //convert all of the chips to money using chiphelper and add to user payment method
            ChipHelper ch        = new ChipHelper();
            double     cashValue = 0;

            foreach (var item in AllChips)
            {
                cashValue += ch.chipsToCash(item);
            }
            CashInPocket = cashValue;
        }
Esempio n. 2
0
 public void convertToChips(double money)
 {
     //convert inserted money to chips for user and add to pocket
     if (CashInPocket - money > 0)
     {
         CashInPocket -= money;
         AllChips      = new ChipHelper().convertCashToChips(money);
     }
     else
     {
         throw new Exception("Not Enough Cash in Pocket.");
     }
 }