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