Last active
February 27, 2020 03:27
-
-
Save natendaben/f0032df900ec00e0c7e4184c0174ad82 to your computer and use it in GitHub Desktop.
Psuedocode for iOS version of 14er Checklist app
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
//Data model: Property List | |
<plist version="1.0"> | |
<array> //array of mountain ranges | |
<dict> //mountain range object | |
<key>totalNumber</key> //total # mountains in that range | |
<integer>6</integer> | |
<key>range</key> //name of mountain range | |
<string>Front Range</string> | |
<key>mountains</key> //array of mountain objects | |
<array> | |
<dict> //mountain object example | |
<key>elevation</key> //elevation of mountain in feet | |
<integer>14423</integer> | |
<key>name</key> //name of mountain | |
<string>Pikes Peak</string> | |
<key>ticks</key> //number of times user has climbed the mountain (default is 0) | |
<integer>0</integer> | |
<key>hikingClass</key> //hiking/climbing difficulty | |
<integer>2</integer> | |
<key>rank</key> //ranking of peak | |
<integer>30</integer> | |
<key>notes</key> //notes from user (default is "") | |
<string></string> | |
<key>imageName</key> //string for name of image for easy loading | |
<string>pikespeak</string> | |
</dict> | |
<dict> //all the other mountains in that range | |
//... | |
</dict> | |
</array> | |
</dict> //end of mountain range object | |
<dict> //all the other mountain ranges | |
//... | |
</dict> | |
</array> | |
</plist> | |
//Data model: Structs | |
struct MountainRange: Codable { //mountain range object | |
var totalNumber: Int | |
var range: String | |
var mountains: [Mountain] | |
} | |
struct Mountain: Codable { //mountain object | |
var name: String | |
var elevation: Int | |
var ticks: Int | |
var rank: Int | |
var notes: String | |
var hikingClass: Int | |
var imageName: String | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment