{"metadata":{"title":"Sloth","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Sloth"}],"externalID":"s:12SlothCreator0A0V","roleHeading":"Structure","symbolKind":"struct","role":"symbol","modules":[{"name":"SlothCreator"}],"navigatorTitle":[{"kind":"identifier","text":"Sloth"}]},"schemaVersion":{"minor":3,"major":0,"patch":0},"topicSections":[{"identifiers":["doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/Sloth\/init(name:color:power:)","doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/SlothGenerator"],"title":"Creating a Sloth","anchor":"Creating-a-Sloth"},{"anchor":"Engaging-in-Activities","title":"Engaging in Activities","identifiers":["doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/Sloth\/eat(_:quantity:)","doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/Sloth\/sleep(in:for:)"]},{"anchor":"Getting-the-Sloths-Schedule","title":"Getting the Sloth’s Schedule","identifiers":["doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/Sloth\/schedule"]},{"title":"Getting the Sloth’s Identity","anchor":"Getting-the-Sloths-Identity","identifiers":["doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/Sloth\/name"]},{"anchor":"Getting-Visual-Attributes","title":"Getting Visual Attributes","identifiers":["doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/Sloth\/color-swift.property","doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/Sloth\/Color-swift.enum"]},{"identifiers":["doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/Sloth\/power-swift.property","doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/Sloth\/Power-swift.enum","doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/Sloth\/energyLevel"],"anchor":"Getting-Magical-Abilities","title":"Getting Magical Abilities"}],"variants":[{"paths":["\/documentation\/slothcreator\/sloth"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","sections":[],"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Sloth"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"},{"kind":"content","content":[{"level":2,"anchor":"overview","type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"text":"Sloths are mammals known for their slowness of movement. They spend most of their","type":"text"},{"type":"text","text":" "},{"text":"lives hanging upside down in trees.","type":"text"}]},{"inlineContent":[{"type":"text","text":"You can create a sloth using the "},{"isActive":true,"type":"reference","identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/Sloth\/init(name:color:power:)"},{"text":" initializer, or","type":"text"},{"type":"text","text":" "},{"type":"text","text":"create a randomly generated sloth using a "},{"type":"reference","identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/SlothGenerator","isActive":true},{"type":"text","text":":"}],"type":"paragraph"},{"syntax":"swift","code":["let slothGenerator = MySlothGenerator(seed: randomSeed())","let habitat = Habitat(isHumid: false, isWarm: true)","do {"," let sloth = try slothGenerator.generateSloth(in: habitat)","} catch {"," fatalError(String(describing: error))","}"],"type":"codeListing"}]}],"hierarchy":{"paths":[["doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator"]]},"abstract":[{"type":"text","text":"A model representing a sloth."}],"seeAlsoSections":[{"generated":true,"anchor":"Essentials","identifiers":["doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/GettingStarted","doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/SlothySample"],"title":"Essentials"}],"identifier":{"url":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/Sloth","interfaceLanguage":"swift"},"references":{"slothy-card.png":{"alt":"Two screenshots showing the Slothy app. The first screenshot shows a sloth map and the second screenshot shows a sloth power picker.","identifier":"slothy-card.png","variants":[{"traits":["2x","light"],"url":"\/images\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/slothy-card@2x.png"}],"type":"image"},"doc://slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator/documentation/SlothCreator/GettingStarted":{"identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/GettingStarted","role":"article","images":[{"type":"card","identifier":"gettingStarted-card.png"}],"title":"Getting Started with Sloths","kind":"article","abstract":[{"type":"text","text":"Create a sloth and assign personality traits and abilities."}],"url":"\/documentation\/slothcreator\/gettingstarted","type":"topic"},"gettingStarted-card.png":{"alt":"The profile images for a regular sloth and an ice sloth.","identifier":"gettingStarted-card.png","variants":[{"url":"\/images\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/gettingStarted-card@2x.png","traits":["2x","light"]}],"type":"image"},"doc://slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator/documentation/SlothCreator/Sloth":{"kind":"symbol","abstract":[{"type":"text","text":"A model representing a sloth."}],"navigatorTitle":[{"text":"Sloth","kind":"identifier"}],"identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/Sloth","title":"Sloth","url":"\/documentation\/slothcreator\/sloth","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Sloth","kind":"identifier"}]},"doc://slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator/documentation/SlothCreator/Sloth/power-swift.property":{"identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/Sloth\/power-swift.property","role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"power"},{"text":": ","kind":"text"},{"text":"Power","preciseIdentifier":"s:12SlothCreator0A0V5PowerO","kind":"typeIdentifier"}],"title":"power","kind":"symbol","abstract":[{"type":"text","text":"The power of the sloth."}],"url":"\/documentation\/slothcreator\/sloth\/power-swift.property","type":"topic"},"doc://slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator/documentation/SlothCreator/SlothySample":{"title":"Slothy: Integrating SlothCreator into an App","kind":"article","images":[{"identifier":"slothy-card.png","type":"card"}],"identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/SlothySample","abstract":[{"type":"text","text":"Integrate SlothCreator into an iOS app for creating and caring"},{"text":" ","type":"text"},{"text":"for custom sloths.","type":"text"}],"role":"sampleCode","type":"topic","url":"\/documentation\/slothcreator\/slothysample"},"doc://slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator/documentation/SlothCreator":{"url":"\/documentation\/slothcreator","title":"SlothCreator","kind":"symbol","images":[{"type":"icon","identifier":"slothCreator-icon.png"}],"type":"topic","abstract":[{"type":"text","text":"Catalog sloths you find in nature and create new adorable virtual sloths."}],"identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator","role":"collection"},"doc://slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator/documentation/SlothCreator/Sloth/energyLevel":{"type":"topic","role":"symbol","url":"\/documentation\/slothcreator\/sloth\/energylevel","title":"energyLevel","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"energyLevel","kind":"identifier"},{"kind":"text","text":": "},{"text":"Int","preciseIdentifier":"s:Si","kind":"typeIdentifier"}],"abstract":[{"text":"The energy level of the sloth.","type":"text"}],"kind":"symbol","identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/Sloth\/energyLevel"},"doc://slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator/documentation/SlothCreator/Sloth/Color-swift.enum":{"role":"symbol","identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/Sloth\/Color-swift.enum","url":"\/documentation\/slothcreator\/sloth\/color-swift.enum","fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Color","kind":"identifier"}],"title":"Sloth.Color","abstract":[{"type":"text","text":"The color of a sloth."}],"type":"topic","kind":"symbol","navigatorTitle":[{"text":"Color","kind":"identifier"}]},"slothCreator-icon.png":{"alt":"A technology icon representing the SlothCreator framework.","identifier":"slothCreator-icon.png","variants":[{"url":"\/images\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/slothCreator-icon@2x.png","traits":["2x","light"]}],"type":"image"},"doc://slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator/documentation/SlothCreator/Sloth/eat(_:quantity:)":{"type":"topic","title":"eat(_:quantity:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"eat","kind":"identifier"},{"text":"(","kind":"text"},{"preciseIdentifier":"s:12SlothCreator0A0V4FoodV","kind":"typeIdentifier","text":"Food"},{"kind":"text","text":", "},{"text":"quantity","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Int","preciseIdentifier":"s:Si","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:Si","text":"Int"}],"abstract":[{"type":"text","text":"Eat the provided specialty sloth food."}],"identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/Sloth\/eat(_:quantity:)","kind":"symbol","role":"symbol","url":"\/documentation\/slothcreator\/sloth\/eat(_:quantity:)"},"doc://slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator/documentation/SlothCreator/Sloth/sleep(in:for:)":{"type":"topic","title":"sleep(in:for:)","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"sleep"},{"text":"(","kind":"text"},{"text":"in","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Habitat","preciseIdentifier":"s:12SlothCreator7HabitatV","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"externalParam","text":"for"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:Si","text":"Int","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:Si","kind":"typeIdentifier","text":"Int"}],"abstract":[{"type":"text","text":"Sleep in the specified habitat for a number of hours."}],"identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/Sloth\/sleep(in:for:)","kind":"symbol","role":"symbol","url":"\/documentation\/slothcreator\/sloth\/sleep(in:for:)"},"doc://slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator/documentation/SlothCreator/SlothGenerator":{"kind":"symbol","navigatorTitle":[{"text":"SlothGenerator","kind":"identifier"}],"url":"\/documentation\/slothcreator\/slothgenerator","abstract":[{"text":"A type that generates sloths.","type":"text"}],"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"SlothGenerator","kind":"identifier"}],"identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/SlothGenerator","role":"symbol","type":"topic","title":"SlothGenerator"},"doc://slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator/documentation/SlothCreator/Sloth/color-swift.property":{"title":"color","kind":"symbol","identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/Sloth\/color-swift.property","abstract":[{"text":"The color of the sloth.","type":"text"}],"role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"color"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:12SlothCreator0A0V5ColorO","text":"Color"}],"type":"topic","url":"\/documentation\/slothcreator\/sloth\/color-swift.property"},"doc://slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator/documentation/SlothCreator/Sloth/name":{"abstract":[{"text":"The name of the sloth.","type":"text"}],"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"name"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"}],"title":"name","url":"\/documentation\/slothcreator\/sloth\/name","role":"symbol","identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/Sloth\/name","type":"topic","kind":"symbol"},"doc://slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator/documentation/SlothCreator/Sloth/Power-swift.enum":{"kind":"symbol","type":"topic","title":"Sloth.Power","navigatorTitle":[{"text":"Power","kind":"identifier"}],"role":"symbol","abstract":[{"text":"The power of a sloth.","type":"text"}],"identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/Sloth\/Power-swift.enum","url":"\/documentation\/slothcreator\/sloth\/power-swift.enum","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"text":"Power","kind":"identifier"}]},"doc://slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator/documentation/SlothCreator/Sloth/init(name:color:power:)":{"url":"\/documentation\/slothcreator\/sloth\/init(name:color:power:)","identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/Sloth\/init(name:color:power:)","role":"symbol","type":"topic","kind":"symbol","title":"init(name:color:power:)","fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"name"},{"kind":"text","text":": "},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"text":"color","kind":"externalParam"},{"kind":"text","text":": "},{"preciseIdentifier":"s:12SlothCreator0A0V5ColorO","text":"Color","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"power","kind":"externalParam"},{"kind":"text","text":": "},{"preciseIdentifier":"s:12SlothCreator0A0V5PowerO","text":"Power","kind":"typeIdentifier"},{"text":")","kind":"text"}],"abstract":[{"type":"text","text":"Creates a sloth with the specified name and color."}]},"doc://slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator/documentation/SlothCreator/Sloth/schedule":{"url":"\/documentation\/slothcreator\/sloth\/schedule","abstract":[{"text":"The care schedule of the sloth.","type":"text"}],"type":"topic","kind":"symbol","title":"schedule","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"schedule"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:12SlothCreator12CareScheduleV","text":"CareSchedule"}],"identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/Sloth\/schedule","role":"symbol"}}}