Пример #1
0
 public void OnRuiSell(object source, FishAmountArgs e)
 {
     if ((marketStore.getRuiList().Count - e.amount) >= 0)
     {
         temp  = marketStore.getRuiList().Count;
         temp -= e.amount;
         marketStore.setRuiList(temp);
     }
     else
     {
         Console.WriteLine("Insufficient Fish ! ");
     }
 }
Пример #2
0
        public void OnRuiBuy(object source, FishAmountArgs e)
        {
            if ((insFishTank.getRuiList().Count - e.amount) >= 0)
            {
                Console.WriteLine("rui buy");
                temp  = insFishTank.getRuiList().Count;
                temp -= e.amount;
                insFishTank.setRuiList(temp);

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