Exemplo n.º 1
0
 public void OnIlishSell(object source, FishAmountArgs e)
 {
     if ((marketStore.getIlishList().Count - e.amount) >= 0)
     {
         temp  = marketStore.getIlishList().Count;
         temp -= e.amount;
         marketStore.setIlishList(temp);
     }
     else
     {
         Console.WriteLine("Insufficient Fish ! ");
     }
 }
Exemplo n.º 2
0
        public void OnIlishBuy(object source, FishAmountArgs e)
        {
            if ((insFishTank.getIlishList().Count - e.amount) >= 0)
            {
                temp  = insFishTank.getIlishList().Count;
                temp -= e.amount;
                insFishTank.setIlishList(temp);

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