// Player buys {quantity} amount of goods from the planet. If the player // can't buy that many, don't let him/her. public bool PlayerBuys(Good item) { try { Supply.Remove(item); player.Ship.Cargo.Add(item); player.Money -= purchasePrices[item]; return(true); } catch (ArgumentException) { return(false); } }