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 ! "); } }
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"); } }