Created
January 11, 2021 19:00
-
-
Save petrosDemetrakopoulos/25e1c3018df1fcba1d06c2a42ac41189 to your computer and use it in GitHub Desktop.
Pizza Enum
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum Pizza { | |
case preparePizza(id: Int, size: Int?, type: PizzaType, doughType: DoughType) | |
case addedExtras(id: Int, extras: [String:Int]) | |
case bakedPizza(id: Int) | |
case deliveredPizza(id: Int) | |
init(id: Int, size: Int?, type: PizzaType, doughType: DoughType) { | |
self = .preparePizza(id: id, size: size, type: type, doughType: doughType) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment