//Bacon
private var baconOwned: Int
private var baconMultiplier: Int
private var baconMultiplierPrice: Double
func buybacon() {
if (muffinsOwned >= 10){
baconOwned += 1*getbaconMultiplier()
muffinsOwned -= 10
}
}
func getbaconOwned() -> Int {
return baconOwned
}
func getbaconMultiplier() -> Int {
return baconMultiplier
}
func addTobaconMultiplier() {
baconMultiplier += 1
}
/// Adds one to the bacon multiplier, and raises the price of later multipliers.
func purchasebaconMultiplier() {
addTobaconMultiplier()
baconOwned -= Int(baconMultiplierPrice)
baconMultiplierPrice *= 1.2
}