Slide 2
Slide 2 text
Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 2
/// Eat the provided specialty sloth food.
///
/// Sloths love to eat while they move very slowly through their rainforest habitats. They
/// are especially happy to consume leaves and twigs, which they digest over long periods
/// of time, mostly while they sleep.
///
/// When they eat food, a sloth's ``energyLevel`` increases by the food's
/// ``Food/energy``.
mutating public func eat(_ food: Food, quantity: Int = 1) -> Int {
energyLevel += food.energy * quantity
return energyLevel
}
4PVSDF"QQMF