Last active
July 23, 2018 19:30
-
-
Save toddkramer/fe490554129711e3fc1e7033f38fc017 to your computer and use it in GitHub Desktop.
Drawing Model
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
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