Skip to content

Instantly share code, notes, and snippets.

@petrosDemetrakopoulos
Last active January 11, 2021 19:03
Show Gist options
  • Save petrosDemetrakopoulos/17eefd985048b1bf98d543141547ada4 to your computer and use it in GitHub Desktop.
Save petrosDemetrakopoulos/17eefd985048b1bf98d543141547ada4 to your computer and use it in GitHub Desktop.
Pizza struct
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