primeiro commit com exercicios de Exercism realizados até esta data
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package lasagna
|
||||
|
||||
// TODO: define the 'OvenTime' constant
|
||||
const OvenTime int = 40
|
||||
|
||||
// RemainingOvenTime returns the remaining minutes based on the `actual` minutes already in the oven.
|
||||
func RemainingOvenTime(actualMinutesInOven int) int {
|
||||
return OvenTime - actualMinutesInOven
|
||||
}
|
||||
|
||||
// PreparationTime calculates the time needed to prepare the lasagna based on the amount of layers.
|
||||
func PreparationTime(numberOfLayers int) int {
|
||||
return numberOfLayers * 2
|
||||
}
|
||||
|
||||
// ElapsedTime calculates the time elapsed cooking the lasagna. This time includes the preparation time and the time the lasagna is baking in the oven.
|
||||
func ElapsedTime(numberOfLayers, actualMinutesInOven int) int {
|
||||
return PreparationTime(numberOfLayers) + actualMinutesInOven
|
||||
}
|
||||
Reference in New Issue
Block a user