常用方法
常用方法
常用方法
常用方法
public void BuySugar() { Console.Write("How much sugar would you like to purchase? (In Cups): "); int sugar = int.Parse(Console.ReadLine()); for (int i = 0; i <= sugar; i++) { player.inventory.playerSugar.Add(new Sugar()); } player.CalculateCostOfSugar(); Console.WriteLine(); }