Skip to content

Instantly share code, notes, and snippets.

@toddkramer
Last active July 23, 2018 19:30
Show Gist options
  • Save toddkramer/fe490554129711e3fc1e7033f38fc017 to your computer and use it in GitHub Desktop.
Save toddkramer/fe490554129711e3fc1e7033f38fc017 to your computer and use it in GitHub Desktop.
Drawing Model
public struct Drawing: Decodable {
let tool: Tool
let size: Int
let color: Color
}
extension Drawing {
enum Tool: String, Decodable {
case pen
case line
case arrow
case rect
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment