Beispiel #1
0
 public void OnKatlaSell(object source, FishAmountArgs e)
 {
     if ((marketStore.getKatlaList().Count - e.amount) >= 0)
     {
         temp  = marketStore.getKatlaList().Count;
         temp -= e.amount;
         marketStore.setKatlaList(temp);
     }
     else
     {
         Console.WriteLine("Insufficient Fish ! ");
     }
 }
Beispiel #2
0
        public void OnKatlaBuy(object source, FishAmountArgs e)
        {
            if ((insFishTank.getKatlaList().Count - e.amount) >= 0)
            {
                temp  = insFishTank.getKatlaList().Count;
                temp -= e.amount;
                insFishTank.setKatlaList(temp);

                temp  = marketStore.getKatlaList().Count;
                temp += e.amount;
                marketStore.setKatlaList(temp);
            }
            else
            {
                Console.WriteLine("Insufficient fish in fish tank");
            }
        }