From the course: Swift 5 Essential Training
Unlock the full course today
Join today to access over 24,100 courses taught by industry experts.
Challenge: Player stats - Swift Tutorial
From the course: Swift 5 Essential Training
Challenge: Player stats
(upbeat electronic music) - Now, I've got my first challenge for you. We're going to focus on creating player stats, different variable types, performing basic operations on them, and printing them out. I've chosen to leave out optionals from this challenge because I haven't shown you the correct way to handle them yet, and I don't want you to get into any force unwrapping bad habits. Feel free to take this challenge beyond what I've laid out if you feel inspired. These challenges are just a baseline. They're not a ceiling. Now this shouldn't take you more than 5 to 10 minutes, but if you're feeling stuck, refer back to the playground examples, or jump into the next video and follow along with my solution. Happy coding.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
The quest begins: Variables34s
-
(Locked)
Variables and constants3m 6s
-
(Locked)
Type safety and inference3m 11s
-
(Locked)
Logging and commenting1m 58s
-
(Locked)
Swift operators2m 42s
-
(Locked)
Understanding strings5m 13s
-
(Locked)
Working with strings5m 11s
-
(Locked)
Type conversions4m 57s
-
(Locked)
Booleans and logical operators2m 40s
-
(Locked)
Introducing optionals3m 15s
-
(Locked)
Accessing documentation1m 23s
-
(Locked)
Challenge: Player stats45s
-
(Locked)
Solution: Player stats4m 12s
-
-
-
-
-
-
-