Last active
January 11, 2021 19:03
-
-
Save petrosDemetrakopoulos/17eefd985048b1bf98d543141547ada4 to your computer and use it in GitHub Desktop.
Pizza struct
This file contains hidden or 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
struct Pizza { | |
let id: Int | |
let size: Int | |
let type: PizzaType | |
let doughType: DoughType | |
let hasExtraIngredients: Bool | |
let extraIngredients: [String: Int] //Where the key is the ingredient and the value is the amount | |
let isBaked: Bool | |
let isDelivered: Bool | |
} | |
enum PizzaType: String { | |
case napolitana = "Napolitana" | |
case bufalla = "Buffala" | |
case tartufata = "Tartufata" | |
} | |
enum DoughType: String { | |
case thin = "Thin" | |
case medium = "Medium" | |
case thick = "Thick" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment