Skip to content

Instantly share code, notes, and snippets.

@AlexPinhasov
Last active February 24, 2019 08:16
Show Gist options
  • Save AlexPinhasov/95431361aa4c726459b53566f9481841 to your computer and use it in GitHub Desktop.
Save AlexPinhasov/95431361aa4c726459b53566f9481841 to your computer and use it in GitHub Desktop.
extension Car {
// Execution Functions
private func turnExteriorLightsOn() {
leftFrontLight .isOn = true
rightFrontLight.isOn = true
leftBackLight .isOn = true
rightBackLight .isOn = true
}
private func checkForBurnedBulbs() {
for lightBulb in bulbs where !lightBulb.isUseable {
Dashboard.display(errorType: .lights)
break
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment